Re: [squid-users] Proxy.pac scripts

From: Fathi Ben Nasr <fathi.engineer@dont-contact.us>
Date: Fri Sep 6 01:10:57 2002

You can't achieve this with pac only.
You need something like php to get the user id after the user have
authenticated against your web server, but then how will you redirect the
user
to another pac ? You have to include some javascript redirect code in your
pac
file, but i think that this is not supported. So, you have, based on your
userid, to give the correct pac file to the user the first time.
For nt groups, if your nt is a samba server then put different pac files in
different locations and call your pac file through a "network url" (sorry
don't remember the exact name of this).
in your netlogon directory, create subdirectories called like your groups
or
users
in smb.conf create a share "proxy" and in the path to this share put
.../netlogon/%u for per user pac file or .../netlogon/%g for per group pac
file and tell yor browsers to get the pac file from
\\yoursambaserver\proxy\proxy.pac
Samba will map \\yoursambaserver\proxy to the directory corresponding to
your
user or his group and so you will get personalised pac files.

Raymond Jacob a écrit :

> 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

(See attached file: smime.p7s)

Received on Fri Sep 06 2002 - 01:10:57 MDT

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