gsk Posted February 19, 2013 Posted February 19, 2013 Hi All, I've been trying to setup a proxy.pac file as a means of enabling proxy exceptions on ipads - that will be it's sole use. I've read a few great threads on here about it and have used several scripts including the one FNGM posted. The weird part is that they all make the ipad able to see 'google.co.uk' when i enter the pac file url in the network settings of the ipad. But it won't let me access the local servers I've put in as exceptions. I have put my code below: function FindProxyForURL(url, host) { //Declare proxy strings as variables var capitaproxy = "PROXY webshield.embc.uk.com:80"; // IP not to use proxy if (shExpMatch(url, "*intranet*")) { return "DIRECT"; } if (shExpMatch(url, "*cctv*")) { return "DIRECT"; } if (shExpMatch(url, "*webserver*")) { return "DIRECT"; } if (shExpMatch(url, "*127.0.0.1*")) { return "DIRECT"; } if (isPlainHostName(host)) { return "DIRECT"; } // URLS not to use proxy server if (shExpMatch(url, "*mail.inthehive.net*")) { return "DIRECT"; } // Slect Proxy Server if (isInNet(myIpAddress(), "10.56.84.0", "255.255.252.0")) { return capitaproxy; } if (isInNet(myIpAddress(), "10.58.188.0", "255.255.252.0")) { return capitaproxy; } if (isInNet(myIpAddress(), "10.58.224.0", "255.255.252.0")) { return capitaproxy; } else return "DIRECT"; }
jinnantonnixx Posted February 20, 2013 Posted February 20, 2013 I use the 'pactester' tool to troubleshoot pac files: pacparser - A library to make your web software pac (proxy auto-config) files intelligent. Comes with much useful pactester tool now. - Google Project Hosting An example of its use: pactester -p "\\myserver\someshare\mypacfilel.pac" -u "http://www.google.co.uk/" -h "google.co.uk"
gsk Posted February 21, 2013 Author Posted February 21, 2013 Thanks, I'll have a look at using that and see what comes up!
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