Last active
November 17, 2023 14:22
-
-
Save magic-lantern/83263e3c1fd251afec8a38d715eefefa to your computer and use it in GitHub Desktop.
Proxy.pac file for tunneling to hosts via ssh (requires matching ~/.ssh/config to work)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function FindProxyForURL(url, host) { | |
// the zotero service should only be local | |
if ( shExpMatch(url, "http://127.0.0.1:23119/*") ) { | |
return "DIRECT"; | |
} | |
// localhost and local stuff should go to through socks proxy | |
if (shExpMatch(host, "skylark.ucdenver.pvt") || | |
shExpMatch(host, "rainier.ucdenver.pvt") || | |
shExpMatch(host, "plissken-em-2222.ucdenver.pvt") || | |
shExpMatch(url, "*127.0.0.1*") | |
) | |
{ | |
return "SOCKS 127.0.0.1:1080"; | |
} | |
// everything else use outbound internet | |
return "DIRECT"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment