Skip to content

Instantly share code, notes, and snippets.

@kashyapp
Created January 11, 2017 08:23
Show Gist options
  • Save kashyapp/eaf688c441acb73875743f3a3eb625ae to your computer and use it in GitHub Desktop.
Save kashyapp/eaf688c441acb73875743f3a3eb625ae to your computer and use it in GitHub Desktop.
auto proxy config for 10.0.* only (setup using ssh -D)
// ssh -D 1080 remotehost
// save this file as something like /usr/local/etc/proxy.pac
// point your browser auto proxy config to this as file:///usr/local/etc/proxy.pac
function FindProxyForURL(url, host) {
PROXY = "SOCKS localhost; DIRECT"
// Apple.com via proxy
if (shExpMatch(host,"10.0.*")) {
return PROXY;
}
// Everything else directly!
return "DIRECT";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment