[squid-dev] Introduction
Amos Jeffries
squid3 at treenet.co.nz
Mon Jan 22 15:29:23 UTC 2018
On 20/12/17 02:11, Daniel Berredo wrote:
> Hello all,
>
> My name is Daniel Santos and I am a DevOps in Brazil. I am working on a
> Hotspot Captive Portal project using Squid and need to be to able to
> evict an user from the Auth Cache before its ttl expired.
> What would be the best way to start on a proper PR? Is there any dev
> guidelines I should be aware of?
>
> I am thinking about adding a new method to the CredentialsCache class
> ("evict", for example) and somehow make squid able to respond to a
> variation of the "PURGE" method. Than I would be able to use squid
> client to evict users from Auth Cache.
>
> Is there anyone that could give me some directions on how to do this?
>
> Thanks in advance,
> Daniel
>
Hi Daniel,
Sorry for the delay your post got stuck in our moderation queue. Please
note that this list now has a normal mailing list subscription process.
You subscribe with the form at
<http://lists.squid-cache.org/listinfo/squid-dev> and follow the bots
instructions.
Information for developers about Squid and the processes used by the
Squid Project is all linked from
<https://wiki.squid-cache.org/DeveloperResources>.
A feature similar to what you describe has been on the wishlist for a
very long time now. Do not go to the effort of a whole new HTTP method,
or anything like PURGE. The CacheMgr interface already has most of the
HTTP message functionality in place to do this type of thing through GET
or POST.
It looks like the external ACL cache is still using the old C-style
dump() code. So it will first need converting into an class inheriting
from Mgr::Action. Then processing added to parse "user=X" tokens from
the URL query-string, and to act on the value found.
Before you go to too much trouble, is there a specific reason why you
are considering this approach instead of just setting shorter TTLs on
the details the helper is supplying Squid?
Be aware the TTL in Squid is simply how often it asks the helper for
updates on the validity. It does *not* relate to when those credentials
expire except as a _maximum_ time until Squid notices actual expiry.
Amos Jeffries
The Squid Software Foundation
More information about the squid-dev
mailing list