[plug] Internet censorship

James Devenish devenish at guild.uwa.edu.au
Sat Sep 20 20:07:37 WST 2003


In message <3F6C40D7.10109 at wasp.net.au>
on Sat, Sep 20, 2003 at 03:58:15PM +0400, Brad Campbell wrote:
> but I have to manually change the proxy settings in my browser and
> then change them back again because I don't want/need to accumulate
> the extra bandwidth on the perth office.

Even without worrying about reconfiguring the proxy, you can make use of
the Netscape* "proxy automatic configuration" ("pac" format) technique to
have your browser make proxying decisions based on pre-determined host
names or IP addresses. For instance, you could tell your browser to use
auto proxy configuration by accessing a URL that provides content of
type application/x-ns-proxy-autoconfig, for example:

function FindProxyForURL(url, host)
{
    if (isPlainHostName(host) ||
        shExpMatch(host, "192.109.42.*") ||
        dnsDomainIs(host, ".bytsex.org") ||
        return "PROXY proxy1.blah:8888; DIRECT";
    else
        return "PROXY proxy2.blah:8888; DIRECT";
}

Of course, every web browser will need to be configured with the URL of
the PAC data.

* By "Netscape" I mean "the company that was known as". The PAC format
  is understood by IE, Mozilla, etc.


_______________________________________________
plug mailing list
plug at plug.linux.org.au
http://mail.plug.linux.org.au/cgi-bin/mailman/listinfo/plug


More information about the plug mailing list