Pac File doesn't work with FM

fko
Posts:1
Joined:Mon Sep 05, 2011 6:25 am
Pac File doesn't work with FM

Post by fko » Mon Sep 05, 2011 6:34 am

Hello
I want to use a pac-file for the proxy configuration and loadbalancing between 2 proxies. So I write the following pac-file:

function FindProxyForURL(url, host) {
clientIP = myIpAddress();
client = clientIP.substring(clientIP.lastIndexOf(".")+1 , clientIP.length);
n = client % 2;

if ( isPlainHostName(host)
|| shExpMatch(host, "192.168.*") // comment
|| shExpMatch(host, "172.16.*") // comment
|| shExpMatch(host, "172.18.*") // comment
|| shExpMatch(host, "127.0.0.*") // comment
)
{
return "DIRECT"; // comment
}

if (n==1) return "PROXY http_proxy:8010; PROXY http_proxy2:8010";
if (n==0) return "PROXY http_proxy2:8010; PROXY http_proxy:8010";

}

The file doesn't work with FM but with IE and normal Firefox. When I use an simple pac-file it will work with FM (see above):
function FindProxyForURL(url, host)
{
if (isPlainHostName(host)
|| shExpMatch(host, "192.168.*") // comment
|| shExpMatch(host, "172.16.*") // comment
|| shExpMatch(host, "172.18.*") // comment
|| shExpMatch(host, "127.0.0.*") // comment
)

return "DIRECT";
else
return "PROXY http_proxy2:8010";
}

SO, can anyone tell me why the first pac-file doesn't work with FM

Post Reply