[squid-users] Re: How can I set a daily maximum download amount ?

From: Adam Aube <aaube01@dont-contact.us>
Date: Thu, 20 May 2004 11:35:47 -0400

Valter Dal Bo wrote:

> As in the Subj, how can I set a maximum download size for each user ?
> I would like to just make them able to download "so much" per day.

You would need to write two custom programs.

One would tail the squid access.log and parse each new entry for the
username and the bytes downloaded, then update some sort of database (MySQL
or similar, a flat file, or a directory with files for each username).

The second would be an external acl helper that would take the username and
check the database to see if the user was overlimit.

You can then use standard squid access controls to deny access to users that
are over their limit. You can just have a cron job empty the database at
midnight to reset the limits for the next day.

Adam
Received on Thu May 20 2004 - 09:40:11 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Jun 01 2004 - 12:00:02 MDT