Re: Global proxy autoconfig script?

From: Michael Pelletier <>
Date: Wed, 10 Sep 1997 10:32:31 -0400 (EDT)

On Wed, 10 Sep 1997, Oskar Pearson wrote:

> We were talking about a global web server that would run a script, and
> based on the IP address of the client machine, return a different
> java auto-config script.

Try using "myIpAddress()" in the script, such as:

FindProxyForUrl() {

 if (isInNet(myIpAddress(), "", "") {
        return "PROXY;";
 } else {
        return "PROXY";

This will cause any user in the "198.95.27" network to use the Squid proxy
on, with a fallback to the main proxy server, and everyone
else will use the main proxy.

This is how I'm planning to implement multiple proxies here. Anyone
familiar enough with JavaScript who could suggest a way to munge the
network number into a proxy name to avoid a large sequence of if
statements, or know how to implement a "case" statement in JavaScript?

Of course, the cgi approach might be better, since the processing onus is
no longer on the client.

        -Mike Pelletier.
Received on Wed Sep 10 1997 - 07:34:55 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:36:57 MST