Skip to content

Instantly share code, notes, and snippets.

@charlypoly
Created February 23, 2018 22:18
Show Gist options
  • Save charlypoly/b77b3068943eaec85ef00efaa419f0d5 to your computer and use it in GitHub Desktop.
Save charlypoly/b77b3068943eaec85ef00efaa419f0d5 to your computer and use it in GitHub Desktop.
example.pac
function FindProxyForURL(url, host) {
// If the hostname matches, use proxy.
if (
shExpMatch(host, "*.aline.work") ||
shExpMatch(host, "aline.work") ||
shExpMatch(host, "*.ipify.org")
) {
return "PROXY xx.xx.xx.xx:8888";
}
// DEFAULT RULE: All other traffic, use direct.
return "DIRECT";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment