Skip to content

kaelthasmanu/cucuota

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

Cucuota

Quota system for Squid proxy
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Example FrontEnd Example2 FrontEnd Example3 FrontEnd

(back to top)

Built With

  • .Net

(back to top)

Getting Started

This project is an alternative to a quota system for Squid. Client Web for this project CucuotaWeb

Prerequisites

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

Installation

  1. Download files
    wget https://github.com/kaelthasmanu/cucuota/releases/download/0.0.3/cucuota.zip
  2. Install packages .Net8 and zip
    sudo apt install dotnet8 unzip 
  3. Unzip folder linux-64.zip
    unzip cucuota.zip
  4. Create file for quotas quota.txt
touch quota.txt
  1. Example configuration for quota.txt
    manuel.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
  2. Create file for banned users banned.txt
touch banned.txt
  1. Crate file with name appsettings.json
touch appsettings.json
  1. For its correct functioning, this application needs the appsettings.json file 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
}
}
  1. Change some variables appsettings.json
    nano appsettings.json
  2. 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
  1. Run project cucuota.dll
dotnet cucuota.dll
  1. Adapt the systemd configuration for you in file dotnet
nano cucuota
  1. Copy file in the directory etc/systemd/system
cp cucuota /etc/systemd/system/
  1. Reload all services systemd
sudo systemctl daemon-reload
  1. Enable serivice cucuota
 systemctl enable cucuota
  1. Check status service
systemctl status cucuota

(back to top)

Usage

Use 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

(back to top)

Roadmap

  • 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).

(back to top)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Manuel - (@Manuel) - manuelalberto.gorrin@gmail.com

Project Link: (Project Link)

(back to top)

About

System Cuota for Proxy Squid

Resources

License

Stars

3 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors