I'm not a list member, so please cc me personally on any replies.
While evaluating SQUID to replace another proxy software package, we found
that it didn't have the ability to serve up a proxy.pac easily (like our
existing proxy software could). I was therefore tasked to find a way to
make it do so. Here is a very simple 1-2-3 step process to do so; I hope
someone else finds it useful. This is against SQUID 2.3 STABLE4, but
should apply generally.
If there's something horriby wrong with this method of serving up a
proxy.pac, I'd love to hear it. Also, if there's a
newer/better/faster/cooler method of doing this, I'd love to hear of it.
This patch has worked well for several months on several SQUID boxes
serving 61 gig (15 million requests) a day for >50k people. Unfortunately,
I can't say where, because security gets pissy about people knowing what
we run. :(
Anyways, the fix is below. Responses or flames welcome.
Henry
1. Add a proxy.pac file to ${SQUIDDIR}/etc/icons, fix permissions to match
other icon files
2. Add a line to ${SQUIDDIR}/etc/mime.conf, using tabs for separators:
\.pac$ application/x-ns-proxy-autoconfig proxy.pac - ascii
3. Patch the source:
*** client_side.c.orig Thu Apr 12 09:45:30 2001
--- client_side.c Fri Jan 19 10:30:58 2001
***************
*** 2208,2213 ****
--- 2208,2217 ----
if ((t = strchr(url, '#'))) /* remove HTML anchors */
*t = '\0';
+ /* check if we received "GET / HTTP/1.0", and if so, return proxy.pac */
+ if ((strlen(url)==1) && (url[0]=='/')) {
+ url="/squid-internal-static/icons/proxy.pac\0";
+ }
/* handle internal objects */
if (internalCheck(url)) {
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
Received on Thu May 31 2001 - 09:17:21 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:02 MST