If you are running Netscape or MSIE, you can use the auto proxy config
feature to write a script that will inform your user's browser to access
certain sites directly... An example would be:
function FindProxyForURL(url, host) {
// Only proxy for http, ftp, and gopher
if ((url.substring(0, 5) != "http:") &&
(url.substring(0, 4) != "ftp:") &&
(url.substring(0, 7) != "gopher:")) {
return "DIRECT";
}
// Don't cache the following:
if (shExpMatch(host, "123.456.789.*") ||
shExpMatch(host, "*go.direct.for.this.domain")) {
return "DIRECT";
}
// Remote
return "PROXY proxy.number.one:3128; PROXY proxy.number.two:3128; DIRECT";
}
This lets you tell browsers to go direct (i.e. not through the cache) for
any site on the subnet 123.456.789.*, and also for all sites in the domain
go.direct.for.this.domain. It will have the browser go through the cache
for everything else. The other nice things it lets you do is to specify
fallback caches (proxy.number.two is the second choice, and if all else
fails go direct), and it also lets you renumber/rename without requiring
your users to change any of their settings -- you just make the
appropriate changes in the the script and their browsers will
automatically reconfigure (the script is loaded each time the browser is
run).
Save the file as proxy.pac on your web server and then set the .pac mime
type to application/x-ns-proxy-autoconfig. Under apache just add the line:
application/x-ns-proxy-autoconfig pac
to your mime.types file. You don't need to do anything to your cache
software to get this working. Just make sure to set the port write when
you write the proxy.pac file.
-Bill kb8wyp
On Thu, 28 Aug 1997, Björn A. Zeeb wrote:
> I have squid running on my local network to cache all the data I get
> from my dynamic dial-up account and to give access to all other comps in
> my localnet to the Internet. Till now I had "inside_firewall none"
> because i have to go out through my prov's proxy to get access to the
> whole Ineternet.
> Now i've installed a http-server (apache) and i dont want squid to cache
> everything it gets from httpd.
> Normally I would change "inside_firewall" to "my.local.domain" but that
> would mean to only get access to the German web.
> Does anyone know how I could solve my problem ?
>
> Bjoern A. Zeeb
>
Received on Thu Aug 28 1997 - 16:20:52 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:36:51 MST