Skip to content

Instantly share code, notes, and snippets.

@jimilinuxguy
Forked from swinton/proxy.pac
Created September 5, 2019 06:22
Show Gist options
  • Select an option

  • Save jimilinuxguy/b3b00d67c23d0da6d20851fcb7cc30bd to your computer and use it in GitHub Desktop.

Select an option

Save jimilinuxguy/b3b00d67c23d0da6d20851fcb7cc30bd to your computer and use it in GitHub Desktop.
Example proxy.pac, using a SOCKS proxy for certain hosts.
function FindProxyForURL(url, host) {
var useSocks = ["imgur.com"];
for (var i= 0; i < useSocks.length; i++) {
if (shExpMatch(host, useSocks[i])) {
return "SOCKS localhost:9999";
}
}
return "DIRECT";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment