Re: [squid-users] Proxy.pac scripts

From: Raymond Jacob <jacob_raymond@dont-contact.us>
Date: Thu, 05 Sep 2002 17:16:37 +0000

Has anyone written a .pac script that can choose the proxy
based on the NT user ID or group? I would rather one .pac
file in one location for all users and then based on their
group or user id re-direct them to a tailored pac file.

Thank you,
Raymond
------------------------------------

From: Fathi Ben Nasr <fathi.engineer@gnet.tn>
To: Kevin Castle <kcastle@mycreditunion.cc>
CC: "'squid-users@squid-cache.org'" <squid-users@squid-cache.org>
Subject: Re: [squid-users] Proxy.pac scripts
Date: 05-Sept-2002 08:23:35 ZE2

Add this line to your /etc/mime.types
application/x-ns-proxy-autoconfig pac
then create a file like this one in your prefered location and give it a
pac
extension
function FindProxyForURL(url, host)
{
if (isPlainHostName(host) || shExpMatch( url, "*.sncft.com.tn/*") ||
shExpMatch(url,"*.excite.com/*"))
return DIRECT;
else if (url.substring(0, 5) == "http:" || url.substring(0, 6) == "https:"
||
url.substring(0, 4) == "ftp:" || url.substring(0, 7) == "gopher:" ||
url.substring(0, 6) == "snews:")
return "PROXY 10.2.172.168:3128; PROXY 10.2.2.200:3128; DIRECT"; }

The url for the pac tutorial is
http://wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html
You can do more with your proxy pac file.
Remeber that if you also use anonymize_headers and remove some information
like
the referrer, you need to let your users go directly to that sites.
I dont't proxy/anonymize excite because it needs such a thing.

Kevin Castle a écrit :

> Does anyone have some good how-to's or examples of how to setup a web
server
> to distribute the script. As well as some good example proxy scripts.
>
> Thanks,
>
> Kevin

(See attached file: smime.p7s)
<< smime.p7s >>

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
Received on Thu Sep 05 2002 - 11:17:38 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:10:06 MST