Skip to content

Instantly share code, notes, and snippets.

@ritu1337
ritu1337 / local-devtree-proxy.pac
Created May 30, 2017 00:00 — forked from jimallman/local-devtree-proxy.pac
Test of Proxy Auto-Configuration (PAC) file as a replacement for messing with /etc/hosts
function FindProxyForURL( url, host ) {
var debugging = false;
var debugPAC;
if (debugging) {
debugPAC = "host: "+ host +"\n";
debugPAC += "url: "+ url +"\n";
debugPAC += "dnsDomainIs(host, 'devtree.opentreeoflife.org'): "+ dnsDomainIs(host, "devtree.opentreeoflife.org") +"\n";
debugPAC += "dnsDomainIs( host, '.devtree.opentreeoflife.org' ): "+ dnsDomainIs( host, '.devtree.opentreeoflife.org' ) +"\n";
debugPAC += "shExpMatch(host, 'devtree.opentreeoflife.org'): "+ shExpMatch(host, "devtree.opentreeoflife.org") +"\n";
}