Re: [squid-users] User access time limit

From: Christoph Haas <[email protected]>
Date: Wed, 7 Dec 2005 19:55:54 +0100

On Wednesday 07 December 2005 17:25, Sean Ali wrote:
> I'm quite new to squid but I have managed to set it up along with
> squidGuard just fine. However, right now for space management purposes
> in the lab, I would like to restrict the user's access to just 1 hour
> of time. Once that time is up they would have to see the system admin
> to have more time granted. Is this possible with squid? Does anyone
> know how I might accomplish this?

There is no built-in "time quota" system in Squid. You would have to
determine from the logs when a user was using the proxy.

Problem:
HTTP is stateless. How do you figure out if a user is still reading a web
page that was transmitted over Squid or if the person is busy with other
occupations? Does it work from the first access for an hour even though
the user just loaded a single page?

Technical solution:
Develop a program which is following the access.log. Count up the time a
user is using the proxy (modulo the problem described above). Use an
external_acl which queries the same process (perhaps using a database in
between) on whether the time is up. If it is then deny the access and
return a "deny_info" error page explaining that the users must see the
operator.

 Christoph

-- 
~
~
".signature" [Modified] 1 line --100%--                1,48         All
Received on Wed Dec 07 2005 - 11:55:58 MST

This archive was generated by hypermail pre-2.1.9 : Sat Dec 31 2005 - 12:00:02 MST