WPAD Issue

Hi

I am using wpad ( PAC file),to access internet with out changing settings every time either when I am at office/home.

I use myIpAddress() function to find my active network, and decide the route based on that. It doesn't seem to work all the time.

I also tried to debug pac file using alert command, nothing is displayed browser console.

Thanks in advance for your guidance.

PAC File:

client_ip = myIpAddress();
alert(client_ip);
if (isInNet(myIpAddress(),"192.168.1.0","255.255.255.0") return "DIRECT";

    // Make everything lower case.
    url = url.toLowerCase();
    host = host.toLowerCase();
    if (isPlainHostName(host)) return normal;
    if (alwaysproxy.test(host)) return proxies;
    if (directs.test(host)) return normal;
    // bail out
    return proxies;