Jump to content

Recommended Posts

Posted

ok using Wpad for ages but I've discovered an issue! When using direct access (always on VPN thingy) the wpad is available and office tries to use the proxy and fails!

 

function FindProxyForURL(url, host) {

 

if (isPlainHostName(host)) { return "DIRECT"; }

 

if (shExpMatch(host, "vpn.beaminster.dorset.sch.uk")) { return "DIRECT"; }

 

if (shExpMatch(host, "*.dcc-sch-4505.local")) { return "DIRECT"; }

 

if (shExpMatch(host, "*des.dorsetcc.gov.uk")) { return "DIRECT"; }

 

if (shExpMatch(host, "*lbbij.dorsetcc.gov.uk")) { return "DIRECT"; }

 

return "PROXY proxy1.rmsafetynet.com:8080; DIRECT";

 

 

how do I make wpad go direct if it is outside the domain.

 

cheers

  • 2 weeks later...
Posted
Compare IPs

 

if (isInNet(myIpAddress(), "10.1.2.0", "255.255.255.0"))

 

 

Beware that myIpAddress() is not reliable. The Mozilla documentation notes that it doesn't work for most Linux hosts (it returns 127.0.0.1) and I'm not entirely sure which IP address it'll return on Windows machines that have multiple network interfaces.

 

https://developer.mozilla.org/en-US/docs/Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_(PAC)_file#myIpAddress

 

Its better to configure access controls on the web server that's serving the wpad file so that the "wrong" clients can't see it at all.

Posted

True, kinda breaks if you have a VM nic sometimes, so might not be good for vpn.

 

Could also put vpn users in a gpo that sets a different proxy.pac for the user

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...