Category Archives: pac proxy files

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

Proxy.pac file name

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

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,”″))
|| (shExpMatch(host,”10.2.*.*”)) // Enter you local IP subnets
) {return “DIRECT”;}
//check for short host names
if (isPlainHostName(host)) {return “DIRECT”;}
if (shExpMatch(url, “*”)) {return “PROXY”;}
if (url.substring(0, 6) == “https:”) {return “DIRECT”;}

//else return proxy
return “PROXY”;