Re: Squid and Junkbuster (a little off topic...)

From: Graham Toal <>
Date: Wed, 7 May 1997 22:44:33 -0500 (CDT)

> I just installed junkbuster ( wich
> allows me to filter web sites where management does not want
> users to go. I got junkbuster to run fine an "talk" to my squid
> caching proxy but now when i look at my squid log files all request
> come from my junkbuster machine and not from the client machines (the
> PC which is running the web browser). I looked in the junkbuster doc
> and command line options to find a way to forward the client ip
> address from junkbuster to squid without any luck. Someone knows
> a way to "forward" the ip address of the client to squid so squid
> "thinks" requests are coming from the client and not junkbuster ?

I looked at junkbuster too but the code was too ropey and it failed too
often for me to trust it, not to mention the issue above. This evening
I've just hacked up a general purpose redirector which I'll be submitting
to the 'contrib' software just as soon as I've made it into publishable
quality code (ie get rid of statically sized arrays, pre-compile the
regexps once, the usual stuff...)

Here's a sample input file, and you can see how you can use it for
what you want; the redirector knows the client IP (unless of course
you come from another proxy in which case you're out of luck again).


# Note: all rules are applied, in order. One pass only.
# invoke with -q flag to exit after first rule that works is applied
# invoke with -t flag for testing from the command line
# completely general purpose. Decided not to customise it for
# the structure of the redirector data; more powerful at the
# expense of slightly more complicated patterns, sometimes.

# This one blocks particular URLs for particular clients (schools mainly)
^([^ ]*)xxx([^ ]*) (204\.117\.188\.)([0-9][0-9]*)/(.*) (.*) GET$ \3\4/\5 \6 GET

# General canonicalise rewrite
^http://(.*):80/(.*) (.*)$
http://\1/\2 \3

^http://(.*):80 (.*)$
http://\1 \2

# Redirect multi-homed host


# ->
# This would be for the Host: tweak if it worked that way...
^http://www.([a-zA-Z][a-zA-Z-]*)*) (.*)$\1/\2 \3

# Doesn't catch the root URL safely so add an extra one
^http://www.([a-zA-Z][a-zA-Z-]*) (.*)$\1/ \2

#Anything left over is treated like it went through this catch-all rule:
Received on Wed May 07 1997 - 21:48:35 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:35:08 MST