Quantcast
Channel: Internet Explorer 8, 9, 10 Forum
Viewing all articles
Browse latest Browse all 1908

How to get the pac auto-config file to work with IE9 and multiple network adapters

$
0
0

Several of our computers have been upgraded from IE8.X to IE9.  Since the upgrade the auto configuration PAC proxy script that selects a proxy based on myIpAddress(), that works fine on IE7 and IE8, now fails on certain machines that have IE9.

Sample of our script:

function FindProxyForURL(url, host) {

// If user requests plain hostnames, e.g. http://informatics/, send direct.

        if (isPlainHostName(host)) return "DIRECT";

// If the machine requesting a website falls within IP range,

// send traffic via proxy stcweb.statcan.ca running on port 80.

        if (isInNet(myIpAddress(),"xxx.xxx.0.0","255.255.0.0") ||

                isInNet(myIpAddress(),"xxx.xxx.xxx.0","255.255.255.0"))

                return "PROXY proxy1.example.ca:80";    

else

return "DIRECT";

}

After analyzing the issue, we found out, that the issue occurred on machines that have multiple network adapters (two virtual,  one wired) and the myIpAddress() function returns the IP address of the first network adapter it will find wich in our case is one of the virtual adapters not the the wired adapter my OS uses to send web traffic.

Is there some way we can specify what adapter "myIpAddress()" should target?


Viewing all articles
Browse latest Browse all 1908

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>