RE: [squid-users] Qoutas

From: Adam Aube <[email protected]>
Date: Mon, 4 Aug 2003 10:47:29 -0400

> My squid is currently setup with authentication. I would like to
> give each user a max of say 10meg per day. Anything more than that,
> squid denies access for the user.

It is possible, but unless I missed something, neither Squid nor any
helper distributed with it has this capability. You would have to code
it, and it would probably require two parts:

1) A daemonized program that tails the access.log, recording the number
of bytes for each username, adding it to any existing total, and storing
this data.

2) An external_acl helper that takes the authenticated username and
queries the daemonized program (via a named pipe) to see if the user has
gone over the limit. The daemonized program responds by sending a signal
to the helper.

It could be done in Perl relatively easily.

Of course, someone else may know of an existing implementation of this,
which would be easier still.

Adam

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.237 / Virus Database: 115 - Release Date: 3/7/2001
Received on Mon Aug 04 2003 - 08:47:35 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:18:34 MST