On 14/04/11 00:45, edward_ryan wrote:
Hi Guys,
Just for a learning experience (I'm learning java at uni and we have a squid
proxy at work) I am trying to create an external acl using Java that will
check if the user has a list of websites that they can access (the name of
the list will just be their username) that other users cannot (there is a
blacklist of domains, but it's a blanket ban). Obviously I need to send the
person's username and the domain they are trying to get to. I know I can use
the %LOGIN for the user name but how do I pass it the domain?
With %DST
The full list of tokens and their meanings is here:
http://www.squid-cache.org/Doc/config/external_acl_type/
Also not sure if I can ask this here but if anyone knows a bit of java. How
do I capture the information passed to the java external acl? Maybe a stupid
question.
Many ways to skin that cat... (from easiest to hardest)
* Echo the stdin content back out stderr as it arrives and watch the
Squid cache.log. If this is more than an experiment you will want to add
a -d flag to turn debugging to stderr on and off.
* A wrapper script that echos to a log before passing the line on to
the helper and resulta back to Squid.
* set "debug_options 82,4" in squid.conf and watch cache.log for
"externalAclLookup: looking up for ".
This will also give you the result verdicts and whether the helper
was bypassed by a cached previous lookup. But can be a little difficult
to read through.
Amos
--
Please be using
Current Stable Squid 2.7.STABLE9 or 3.1.12
Beta testers wanted for 3.2.0.6