Internet Explorer Version: 8.0.7600.16385
OS: Windows 7 Enterprise
OS Version: 6.1.7600 N/A Build 7600
I employed a proxy automatic configuration (PAC) file to dynamically determine when my browser traffic needs to route thru a proxy. The PAC script examines the first three octets of the host machine's IP address to determine the machine's location then use a proxy. Use of a proxy depends on location. The script is as follows:
function FindProxyForURL(url, host) { alert('Host name: '+ host) alert('isPlainHostName(): '+ isPlainHostName(host))if (shExpMatch(myIpAddress(), "99.100.70.*") || shExpMatch(myIpAddress(), "98.100.75.*") || shExpMatch(myIpAddress(), "100.99.70.*")) {//Bypass the proxy for URLs with-in the local domainif (shExpMatch(host, "*.ghrsystems.com")) { return"DIRECT"; }//Bypass the proxy when accessing local sitesif (isPlainHostName(host)) { return"DIRECT"; }return"PROXY 10.132.230.33:8080"; }//Assume my laptop is not at work.return"DIRECT"; }
PROBLEM:
My machine has five network adapters (two virtual, two wireless, one wired). The function "myIpAddress()" is pulling the IP address from one of the virtual adapters, which isn't the one my operating system is using. My OS is using the wired adapter to send web traffic. Is there some way I can specify what adapter "myIpAddress()" should target?
Adam