rob998 Posted June 24, 2015 Posted June 24, 2015 Hello, Can anyone spot any problems with this? I need a WPAD for my DirectAccess clients. GP applies the proxy every 15 mins which is annoying when off site as the internet stops working until you untick the proxy. function FindProxyForURL(url, host) { //Declare proxy strings as variables var proxy = "PROXY proxyserver:800"; // IP not to use proxy if (shExpMatch(url, "http://10.64.*")) { return "DIRECT"; } if (shExpMatch(url, "http://192.168.*")) { return "DIRECT"; } if (isPlainHostName(host)) { return "DIRECT"; } // URLS not to use proxy server if (shExpMatch(url, "*internalserver1*")) { return "DIRECT"; } if (shExpMatch(url, "*internalserver2*")) { return "DIRECT"; } if (shExpMatch(url, "*internalserver3*")) { return "DIRECT"; } if (shExpMatch(url, "*internalserver4*")) { return "DIRECT"; } if (shExpMatch(url, "*internalserver5*")) { return "DIRECT"; } if (shExpMatch(url, "*internalserver6*")) { return "DIRECT"; } if (shExpMatch(url, "*internalserver7*")) { return "DIRECT"; } // Apply proxy if machine is on internal network if (isInNet(myIpAddress(), "10.64.0.0", "255.255.240.0")) { return proxy; } if (isInNet(myIpAddress(), "10.0.0.0", "/20")) { return proxy; } else return "DIRECT"; } When i'm at home I can browse to the WPAD on the server and download it so connection to it isn't the issue. So - In School via WPAD = internet fine // At home via WPAD no internet access. Thanks, Rob
Duke5A Posted July 21, 2015 Posted July 21, 2015 Hello, Can anyone spot any problems with this? I need a WPAD for my DirectAccess clients. GP applies the proxy every 15 mins which is annoying when off site as the internet stops working until you untick the proxy. function FindProxyForURL(url, host) { //Declare proxy strings as variables var proxy = "PROXY proxyserver:800"; // IP not to use proxy if (shExpMatch(url, "http://10.64.*")) { return "DIRECT"; } if (shExpMatch(url, "http://192.168.*")) { return "DIRECT"; } if (isPlainHostName(host)) { return "DIRECT"; } // URLS not to use proxy server if (shExpMatch(url, "*internalserver1*")) { return "DIRECT"; } if (shExpMatch(url, "*internalserver2*")) { return "DIRECT"; } if (shExpMatch(url, "*internalserver3*")) { return "DIRECT"; } if (shExpMatch(url, "*internalserver4*")) { return "DIRECT"; } if (shExpMatch(url, "*internalserver5*")) { return "DIRECT"; } if (shExpMatch(url, "*internalserver6*")) { return "DIRECT"; } if (shExpMatch(url, "*internalserver7*")) { return "DIRECT"; } // Apply proxy if machine is on internal network if (isInNet(myIpAddress(), "10.64.0.0", "255.255.240.0")) { return proxy; } if (isInNet(myIpAddress(), "10.0.0.0", "/20")) { return proxy; } else return "DIRECT"; } When i'm at home I can browse to the WPAD on the server and download it so connection to it isn't the issue. So - In School via WPAD = internet fine // At home via WPAD no internet access. Thanks, Rob I'm a bit confused; the WPAD file is still accessible at home when offsite? Is the URL to it specified in the auto proxy config field in Internet Options? The way I use it is I specify the URL to the file in Internet Options under 'Use automatic configuration script' via GPO. The script is hosted on an internal server that isn't accessible from the outside. When a user takes their laptop offsite IE doesn't have access to the script anymore and reverts to going to direct.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now