Set monthly data limit for internet proxy (squid) users

internetPROXYsquid

We are using a squid proxy server (version 3.1.4) in our office environment on linux box. In total we are approximately 20 users and all are in one network and we have internet plan of 25GB/month. Now what we want is restrict each user to some size say 1GB/user/month (will be more better if it is more configurable, say 512MB for some users, 2GB for some users) , so that everyone get equal access.

I have searched a lot over internet like to restrict with bandwidth, or using maximum download size parameter reply_body_max_size, delay parameters. But cannot find what I want.

Is there any way to do this in squid or any other open source option?

Best Answer

I've been struggling to add this functionality as well. The problem with squish is, it's squishing users that is not supposed to be squished.

The workaround that I used was to use the daily data from lightsquid stored in /var/lib/lightsquid/report/<date>/.total. Since lightsquid data is updated every 10 minutes, it also gave my squid setup the ability of an almost "real-time" quota capability.

Related Question