Link to home
Start Free TrialLog in
Avatar of cowarlick
cowarlickFlag for Afghanistan

asked on

PAC file issues

Having problems making IE 9 read the following PAC file. Can anyone see where my problem(s) lie in this syntax:

function FindProxyForURL(url,host)
{
// set ws1 and ws2 to the 2 proxies
var ws1="172.16.1.246"
var ws2="172.16.1.248"
// find the 4th octet - if even, is ws1/ws2 else ws2/ws1
var myip=myIpAddress()
var ipbits=myip.split(".")
var myseg=parseInt(ipbits[3])
if(myseg==Math.floor(myseg/2)*2) {
      var proxone=ws1
      var proxtwo=ws2
}
else {
      var proxone=ws2
      var proxtwo=ws1
}
// if name has no dots, or is our domain, or starts 172., or if my
// current address does not start 10. don't use proxy
if(isPlainHostName(host) ||
      dnsDomainIs(host,".sirote.com") ||
      myip.substring(0,3)!=="10." ||
      host.substring(0,3)=="172."      )
      
//
{
// alert("direct")
return "DIRECT";
}
else {
// alert("proxy")
      return "PROXY "+proxone+":8080; PROXY "+proxtwo+":8080" ;
}
}
Avatar of cowarlick
cowarlick
Flag of Afghanistan image

ASKER

Update:
Have gone to a basic PAC file to see if maybe it is another issue. It still does not work. See code below:
function FindProxyForURL(url, host)
{
  return "PROXY 172.16.1.246:8080";
}
Have attempted to use this pac file locally via file://C:/pxy/proxy.pac in both IE9, IE10, and firefox with no luck. Am I missing something?
ASKER CERTIFIED SOLUTION
Avatar of cowarlick
cowarlick
Flag of Afghanistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial