Jump to content

Recommended Posts

Posted

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";

}

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...