Skip to content

Instantly share code, notes, and snippets.

@sahal
Last active June 5, 2021 15:17
Show Gist options
  • Save sahal/2d652a027ca79164dd8a to your computer and use it in GitHub Desktop.
Save sahal/2d652a027ca79164dd8a to your computer and use it in GitHub Desktop.
Proxy Auto Configuration - SOCKS5 Sample
// see: http://blog.sahal.info/post/58278726443/chromebook-socks-proxies-and-ssh-tunnels
function FindProxyForURL(url, host)
{
// On my Chromebook, I've found that "Secure Shell" or Chrome itself doesn't close ports after a session timesout
// so I have to switch the local proxy listen address to 8081. Now, I don't have to use two proxy.pac files.
// See Simple PAC Load Balancing on proxypacfiles.com
// http://www.proxypacfiles.com/proxypac/index.php?option=com_content&view=article&id=63&Itemid=104
// https://web.archive.org/web/20131011081101/http://www.proxypacfiles.com/proxypac/index.php?option=com_content&view=article&id=63&Itemid=104
return "SOCKS5 localhost:8080; SOCKS5 localhost:8081";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment