Below are the configuration of current proxy.pac
file.
function FindProxyForURL(url, host)
{
var resolved_ip = dnsResolve(host);
if (isInNet(resolved_ip, "10.0.0.0", "255.0.0.0") ||
isInNet(resolved_ip, "172.16.0.0", "255.240.0.0") ||
isInNet(resolved_ip, "192.168.0.0", "255.255.0.0") ||
isInNet(resolved_ip, "127.0.0.0", "255.0.0.0"))
return "DIRECT";
else
return "PROXY 172.16.51.254:8080";
We need to change in below line. Please help me on this.
return "PROXY 172.16.51.254:8080";
We have many offices and which have different proxy so we need to single wpad file for whole network.
We are NOT going to be hard-coding 172.16.51.254
in this file. Instead, we need to have the wpad/pac file figure out what the proxy is. It will know the proxy address by replacing the 4th octet of the person's PC with .254.
Example:
If your PC address is 172.16.51.83
, then the Proxy will be 172.16.51.254
.
If your PC address is 172.16.8.22
, then the Proxy will be 172.16.8.254
.