Skip to content

Instantly share code, notes, and snippets.

@akheron
Created January 5, 2011 08:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akheron/766049 to your computer and use it in GitHub Desktop.
Save akheron/766049 to your computer and use it in GitHub Desktop.
Sample proxy.pac to be used with SSH tunnels
// -*- js2 -*-
//
// Works at least in Chrome. To setup the SOCKS proxy, use the -D option:
//
// ssh -D 5001 user@tunnel_endpoint_host
//
function FindProxyForURL(url, host) {
if(dnsDomainIs(host, "192.168.1.5")) {
return "SOCKS localhost:5001;";
}
return "DIRECT";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment