Bandwidth quota in squid

吃可爱长大的小学妹 提交于 2019-12-25 07:59:45

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!