Skip to content

Instantly share code, notes, and snippets.

@shwang
Created April 20, 2016 21:10
Show Gist options
  • Save shwang/9704052eadab0edcd269fe19997eb4ed to your computer and use it in GitHub Desktop.
Save shwang/9704052eadab0edcd269fe19997eb4ed to your computer and use it in GitHub Desktop.
function FindProxyForURL(url, host) {
if (dnsDomainIs(host, ".rescomp.berkeley.edu")) {
return "SOCKS5 localhost:50000; DIRECT";
}
if (dnsDomainIs(host, ".housing.berkeley.edu")) {
return "SOCKS5 localhost:50000; DIRECT";
}
if (dnsDomainIs(host, ".cdlib.org")) {
return "SOCKS5 localhost:50000; DIRECT";
}
if (dnsDomainIs(host, ".naxosmusiclibrary.com")) {
return "SOCKS5 localhost:50000; DIRECT";
}
if (dnsDomainIs(host, ".alexanderstreet.com")) {
return "SOCKS5 localhost:50000; DIRECT";
}
// Default case.
return "DIRECT";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment