Web & HTTP‎ > ‎

Auto Proxy

wpad.dat

The browser looks for host with the name wpad in the local domain (ie: wpad.martin.cc).  If located it will the try to fetch the URL http://wpad.martin.cc/wpad.dat from the host.  A sample wpad.dat file is provided below:

function FindProxyForURL(url, host)
{
  // alert("my IP address is " + myIpAddress() );
  if (isInNet(myIpAddress(), "192.168.4.0", "255.255.255.0"))
  {
    // alert ("using proxy");
    return "PROXY proxy.martin.cc:8888"; 
  }
  else
  {
    // alert("going direct");
    return "DIRECT";
  }
}
ċ
wpad.dat
(0k)
Chris Martin,
28 Dec 2012, 06:30