[squid-users] How to limit user traffic quota?

Antony Stone Antony.Stone at squid.open.source.it
Thu Dec 3 12:45:31 UTC 2015

On Thursday 03 December 2015 at 13:34:32, GoGo net wrote:

> As I do NOT want to add extra cost to squid, I will stay with the script
> and try to optimise it.

What do you mean by "cost"?


> > On Dec 3, 2015, at 8:27 PM, Amos Jeffries <squid3 at treenet.co.nz> wrote:
> > 
> > On 4/12/2015 1:14 a.m., GoGo net wrote:
> >> I am running squid 3.5 in my LAN as a proxy for surfing internet.
> >> 
> >> The proxy is shared by all users in the LAN, and every user has a
> >> username/password configured in their web browser.
> >> 
> >> Now, I want to limit user traffic quota, say every user 100GB/month. How
> >> can achieve this?
> >> 
> >> Currently, I use a script to monitor **access.log** of squid, and
> >> aggregate the traffic from log to calculate user traffic. But I am
> >> wondering what is the best practise to limit user quota? Is there a
> >> better way to limit user traffic quota?
> > 
> > Nope. Squid is designed to optimize traffic not to de-optimize it. So
> > does not do quota limitations.
> > 
> > However the OS QoS controls often do support quotas and do so far better
> > than Squid could even get close to. Squid can integrate with those using
> > tcp_outgoing_tos/mark and qos_flows to deliver per-request
> > classification tags to the OS QoS system.
> > 
> > If you stay wit a helper script you maybe could still optimize it a
> > little. Your log monitoring Script could be run as a log daemon helper
> > in order to get the log lines as soon as they are written. That also
> > lets you send a custom log format separate from the access.log to the
> > helper so it can work better.

All generalisations are inaccurate.

                                                   Please reply to the list;
                                                         please *don't* CC me.

More information about the squid-users mailing list