Re: [squid-users] How to do a limit quota download on a Squid proxy

From: John Doe <jdmls_at_yahoo.com>
Date: Fri, 10 Jul 2009 01:43:37 -0700 (PDT)

From: tintin_vefg54e654g <maf1488_at_hotmail.fr>
> I have a Mandriva 2009.1 OS, with squid ( + sarg, and mrtg) proxy.
> so, in the purpose to keep few free brandwicth for working using ^^ I would
> like to set limits download.
> I don't have users identifications, I see my users by IP adress.
> The matter is I would like to set a quota as a limit of 100Mb per day of
> download per IP adress.
> How is it possible to do such thing.

Maybe using an external_acl script given the IP + 'Content-Length' header would do, but you have to code it.
You add the size value to a memcache value, based on the IP.
If the memcache value is > 100MB, deny access.
Restart/clear memcache everyday.
And you might have to handle ranges...

JD

      
Received on Fri Jul 10 2009 - 08:43:46 MDT

This archive was generated by hypermail 2.2.0 : Fri Jul 10 2009 - 12:00:02 MDT