I just wen through a round of workin on a similar thing. The two things
you'll end up doing would be this:
function FindProxyForUrl(url, host)
{
return "PROXY your.proxy.server:3128; DIRECT";
}
Obviously, you can have other things going on there, but this is the
statement that says "Try using your.proxy.server port 3128 to proxy the
request, and if that fails, go direct". When your user is on the network,
this will work fine. When they go offline or out of the country, the
browser won't be able to download the PAC file and promt the user saying "I
can't get the configuration, should I use the last one that worked?" If the
user says yes, then the browser will first try contacting your.proxy.server
and then, failing at that, going direct automatically.
For more information on how to write PAC files, check out
http://home.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html
Jon
> -----Original Message-----
> From: James A. Mutter [SMTP:jmutter@netwalk.com]
> Sent: Monday, August 30, 1999 2:29 PM
> To: squid-users@ircache.net
> Subject: Squid, Proxy.pac, and Mobile Computers.
>
>
> A few days ago I asked a question regarding a proxy auto-config file,
> netscape, and squid. I'm not sure that I was entirely clear in the
> way the question was phrased, so I'm going to ask again.
>
> Situation A:
> User owns a laptop and uses http://blah.foo.org/proxy.pac to
> autoconfig Netscape to use Squid. No problems, everything works as
> expected.
>
> Situation B:
> Same user takes his laptop home, to a foreign office, any place to
> where he cannot access the proxy server or it is inconvenient to
> access the proxy server. I don't want the user mucking around in the
> Netscape preferences changing his settings from "Connect using proxy"
> to "Direct connection". Will Netscape complain when it can't find the
> auto-config stored at "http://blah.foo.org/proxy.pac", or can it
> somehow be configured to ignore the proxy settings when it can't find
> the .pac?
>
> Additionally, I'm looking for info on how to write autoconfig files.
> Any pointers?
>
> This may seem a bit off topic for this list, however I can't justify
> using Squid, or any other proxy for that matter, if I can't make it
> play nice with laptop computers.
>
> Thank again for the help,
>
> Jim
Received on Mon Aug 30 1999 - 14:12:29 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:48:08 MST