Tag Archives: Proxy

PAC file proxy

Working PAC file proxy reason for use iPad WebDAV needs local exclusions.

This pac uses Embc Openhive for all traffic except https but then uses https just for Openhive.
Also excludes local traffic from proxy eg WebDAV or local web intranet traffic
Modify host name , change 10.2.*.* to your local ip range proxy if not on Openhive.
Call file proxy.pac or .dat if using local web server remember to add mime type:-
application/x-ns-proxy-autoconfig (as found here http://marckean.wordpress.com/2010/02/09/setting-up-proxy-pac-files-in-iis7-for-proxy-use/)

Proxy.pac file name

Quick test save to c:\proxy.pac point auto section of proxy to :/

file://c:\proxy.pac
So
Copy below to notepad and save as proxy.pac

function FindProxyForURL(url, host) {
//check for local domains
if (dnsDomainIs(host,”localserver-srv01.domain.local”)) {return “DIRECT”;}
//check for local IP addresses
if ((shExpMatch(host,”127.0.0.1″))
|| (shExpMatch(host,”10.2.*.*”)) // Enter you local IP subnets
) {return “DIRECT”;}
//check for short host names
if (isPlainHostName(host)) {return “DIRECT”;}
if (shExpMatch(url, “https://leicester.inthehive.net*”)) {return “PROXY webshield.embc.uk.com:80”;}
if (url.substring(0, 6) == “https:”) {return “DIRECT”;}

//else return proxy
return “PROXY webshield.embc.uk.com:80”;
}