Y
Yashy99
Guest
Hi All,
We have a WPAD.dat file that has been used and works fine internally on all of our local network. But on VPN, it doesn't work correctly. We have enabled split tunneling on the firewall and when I connect to the VPN, I obtain the address on the 10.201.50.x range. Instead of going out 'DIRECT' as the line in the code shows, it skips this and goes down to the default rule which is to go out via the Proxy. I have tried everything and I'm reading that it is highly likely the myIpAddress() function is the issue? I've even tried prioritising the metric settings by using powershell to prioritise the VPN adapter, but still nothing. Can you help me? I'm using Edge version 87.0.664.75.
function FindProxyForURL(url, host) {
//url = url.toLowerCase();
//host = host.toLowerCase();
// If the hostname matches, send direct.
if (dnsDomainIs(host, ".contoso.co.uk") ||
shExpMatch(host, "(*.contoso.co.uk|contoso.local)"))
return "DIRECT";
// If the requested website is hosted within the internal network, send direct.
if (isPlainHostName(host) ||
shExpMatch(host, "*.local") ||
isInNet(dnsResolve(host), "10.0.0.0", "255.0.0.0") ||
isInNet(dnsResolve(host), "172.16.0.0", "255.240.0.0") ||
isInNet(dnsResolve(host), "192.168.0.0", "255.255.0.0") ||
isInNet(dnsResolve(host), "173.37.0.0", "255.255.0.0") ||
isInNet(dnsResolve(host), "127.0.0.0", "255.255.255.0"))
return "DIRECT";
if (isInNet(myIpAddress(), "10.201.50.0","255.255.254.0"))
return "DIRECT";
// DEFAULT RULE: All other traffic, use below proxies, in fail-over order.
return "PROXY 10.215.0.230:8080; DIRECT";
}
Thank you
Yashy99
Continue reading...
We have a WPAD.dat file that has been used and works fine internally on all of our local network. But on VPN, it doesn't work correctly. We have enabled split tunneling on the firewall and when I connect to the VPN, I obtain the address on the 10.201.50.x range. Instead of going out 'DIRECT' as the line in the code shows, it skips this and goes down to the default rule which is to go out via the Proxy. I have tried everything and I'm reading that it is highly likely the myIpAddress() function is the issue? I've even tried prioritising the metric settings by using powershell to prioritise the VPN adapter, but still nothing. Can you help me? I'm using Edge version 87.0.664.75.
function FindProxyForURL(url, host) {
//url = url.toLowerCase();
//host = host.toLowerCase();
// If the hostname matches, send direct.
if (dnsDomainIs(host, ".contoso.co.uk") ||
shExpMatch(host, "(*.contoso.co.uk|contoso.local)"))
return "DIRECT";
// If the requested website is hosted within the internal network, send direct.
if (isPlainHostName(host) ||
shExpMatch(host, "*.local") ||
isInNet(dnsResolve(host), "10.0.0.0", "255.0.0.0") ||
isInNet(dnsResolve(host), "172.16.0.0", "255.240.0.0") ||
isInNet(dnsResolve(host), "192.168.0.0", "255.255.0.0") ||
isInNet(dnsResolve(host), "173.37.0.0", "255.255.0.0") ||
isInNet(dnsResolve(host), "127.0.0.0", "255.255.255.0"))
return "DIRECT";
if (isInNet(myIpAddress(), "10.201.50.0","255.255.254.0"))
return "DIRECT";
// DEFAULT RULE: All other traffic, use below proxies, in fail-over order.
return "PROXY 10.215.0.230:8080; DIRECT";
}
Thank you
Yashy99
Continue reading...