Table of Contents
This project is an alternative to a quota system for Squid. Client Web for this project CucuotaWeb
This is an example of how to list things you need to use the software and how to install them.
- dotnet8 and unzip
sudo apt install dotnet8 unzip
- Download files
wget https://github.com/kaelthasmanu/cucuota/releases/download/0.0.3/cucuota.zip
- Install packages
.Net8 and zipsudo apt install dotnet8 unzip
- Unzip folder
linux-64.zipunzip cucuota.zip
- Create file for quotas
quota.txt
touch quota.txt- Example configuration for
quota.txtmanuel.gorrin 15gb/Month #Manuel Alberto pepe.alberto 5gb/Month #Pepe Alberto juan.alfonso 10gb/Month #Juan Alfonso * 2GB/Month #Por defecto todos los usuarios que no estan especificados
- Create file for banned users
banned.txt
touch banned.txt- Crate file with name
appsettings.json
touch appsettings.json- For its correct functioning, this application needs the
appsettings.jsonfile to contain the following information
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"Microsoft.EntityFrameworkCore.Database": "Warning"
}
},
"AllowedHosts": "*",
"ConnectionStrings": {
"SqliteConnection": "Data Source=./db.db"
},
"WorkingFiles": {
"LogFile": "/home/manuel/Desktop/cucuota/cucuota/bin/Debug/net8.0/access.log",
"QuoteFile": "/home/manuel/Desktop/cucuota/cucuota/bin/Debug/net8.0/quota.txt",
"BannedFile": "/home/manuel/Desktop/cucuota/cucuota/bin/Debug/net8.0/banned.txt",
"FilePasswordLocal": "/etc/squid/passwords"
},
"ProxyServer": {
"Server": "nameserver or ip",
"Port": "3128"
},
"LDAPServer": {
"Server": "nameserver or ip",
"ServerPort": 389,
"UserDN": "username",
"PasswordDN": "password",
"DN": "ou=Usuarios,dc=domain,dc=cu"
},
"TimeToReadLog": {
"Time" : 300
},
"URLListen": {
"base_url": "http://0.0.0.0:5173"
},
"JwtOptions": {
"Issuer": "https://localhost:7004",
"Audience": "https://localhost:7004",
"SigningKey": "4a9d45c7b5719c26d673be5944de1994e8432d70aafadf944c0c90b6f9437d1f",
"ExpirationSeconds": 3600
}
}- Change some variables
appsettings.jsonnano appsettings.json
- Example to Create Migrations
/home/manuel/.dotnet/dotnet ef migrations add --project cucuota/cucuota.csproj --startup-project cucuota/cucuota.csproj --context Database --configuration Debug Initial --output-dir Migrations- Run project
cucuota.dll
dotnet cucuota.dll- Adapt the systemd configuration for you in file
dotnet
nano cucuota- Copy file in the directory
etc/systemd/system
cp cucuota /etc/systemd/system/- Reload all services systemd
sudo systemctl daemon-reload- Enable serivice
cucuota
systemctl enable cucuota- Check status service
systemctl status cucuotaUse this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.
For more examples, please refer to the Documentation
- System Cuota
- View Admin
- View Client
- Authentication LDAP
- Manager Traffic With %
- Free Traffic for X time
- Server Statistics
- Dashboard
- Behavior Graphs
See the (open issues) for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt for more information.
Manuel - (@Manuel) - manuelalberto.gorrin@gmail.com
Project Link: (Project Link)



