[squid-users] Problems with proxy.pac

From: Manoj Kumar Chitlangia <mkchitlangia_02@dont-contact.us>
Date: Sat, 6 Nov 2004 19:23:54 +0530 (IST)

Hello,

My network has two proxy servers and i need to balance the traffic load
between these two. I used the following proxy.pac file.

function FindProxyForURL(url, host)
{
        if (isPlainHostName(host) || dnsDomainIs(host, ".iiita.ac.in") ||
dnsDomainIs(host, ".local") || (host.substring(0,4) == "172.") || host ==
"iiita.ac.in" || host == "127.0.0.1")
                return "DIRECT";
        if(myIpAddress.substring(0,6) == "172.19" || myIpAddress.substring(0,6)
== "172.24")
        {
                if (url.substring(0, 5) == "http:") {
                        return "PROXY 172.31.1.8:8080";
                    }
                else if (url.substring(0, 4) == "ftp:") {
                        return "PROXY 172.31.1.8:8080";
                }
                else if (url.substring(0, 7) == "gopher:") {
                        return "PROXY 172.31.1.8:8080";
                }
                else if (url.substring(0, 6) == "https:" || url.substring(0, 6)
== "snews:") {
                        return "PROXY 172.31.1.8:8080";
                }
                else {
                        return "DIRECT";
                }
         }
               if (url.substring(0, 5) == "http:") {
                return "PROXY 172.31.1.1:8080";
               }
        else if (url.substring(0, 4) == "ftp:") {
               return "PROXY 172.31.1.1:8080";
        }
        else if (url.substring(0, 7) == "gopher:") {
                return "PROXY 172.31.1.1:8080";
        }
        else if (url.substring(0, 6) == "https:" || url.substring(0, 6) ==
"snews:") {
                return "PROXY 172.31.1.1:8080";
        }
        else {
                return "DIRECT";
        }
}

The problem is that the above file works fine with Internet Explorer but
does not work with Mozilla, Opera and other browsers. Please suggest me
how to get rid of this problem and share the load of the netwok between
these two proxies.
NOTE: 172.19.X.X n 172.24.X.X are two VLANs on my network.

Manoj Chitlangia
Received on Sat Nov 06 2004 - 07:04:41 MST

This archive was generated by hypermail pre-2.1.9 : Wed Dec 01 2004 - 12:00:01 MST