Skip to content

Instantly share code, notes, and snippets.

@spacelatte
Last active September 7, 2020 07:39
Show Gist options
  • Select an option

  • Save spacelatte/2f505c93009dc1176db87f12c162eb61 to your computer and use it in GitHub Desktop.

Select an option

Save spacelatte/2f505c93009dc1176db87f12c162eb61 to your computer and use it in GitHub Desktop.
proxy pac wpad auto config file
function FindProxyForURL(url, host) {
if(false
|| shExpMatch(host, "*iyz*")
|| shExpMatch(host, "*.vpn")
|| shExpMatch(host, "*.ssh")
|| shExpMatch(host, "*.nip.io")
|| shExpMatch(host, "*imgur.com")
|| shExpMatch(host, "*.wtfismyip.com")
|| shExpMatch(host, "*hopperapp.com")
|| shExpMatch(host, "*wikileaks.org")
|| shExpMatch(host, "*wikipedia.org")
|| shExpMatch(host, "*socks.188.166.13.50.xip.io")
) return "SOCKS5 localhost:1080; SOCKS localhost:1080; HTTP localhost:3128; PROXY localhost:8080; DIRECT";
if(false
|| shExpMatch(host, "*.onion")
|| shExpMatch(host, "*supportxmr.com")
|| shExpMatch(host, "*torproject.org")
|| shExpMatch(host, "*googleadservices.com")
|| shExpMatch(host, "*tor.188.166.13.50.xip.io")
) return "SOCKS5 tor.n0pe.me:9050; SOCKS tor.n0pe.me:9050; HTTP tor.n0pe.me:3128; PROXY tor.n0pe.me:8080; DIRECT";
return "DIRECT";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment