问题
Can anyone help me with finding a way to do 'per user quota' on squid like people login to the proxy they have a cap like 1GB or something (Might be different for each user) and when they use 1GB of Bandwidth it stops their internet and redirects them to a webpage on the a web server saying they have run out of internet etc..
回答1:
Squid doesn't have anything to do that. You have to code an external helper and a process that counts the bytes transferred from the logs. I'd write a daemon that receives the logs via UDP which could be queried by the external helper to check if the user is over quota.
来源:https://stackoverflow.com/questions/9958891/bandwidth-quota-in-squid