Skip to content

Instantly share code, notes, and snippets.

@josephbolus
Forked from jasdeepkhalsa/socks.txt
Last active November 14, 2023 18:00
Show Gist options
  • Save josephbolus/e214b3720dc1f3d6ef274ad905e6ab7d to your computer and use it in GitHub Desktop.
Save josephbolus/e214b3720dc1f3d6ef274ad905e6ab7d to your computer and use it in GitHub Desktop.
Configuring a SOCKS proxy server in Chrome
From: http://www.chromium.org/developers/design-documents/network-stack/socks-proxy
To configure chrome to proxy traffic through the SOCKS v5 proxy server myproxy:8080, launch chrome with these two command-line flags:
--proxy-server="socks5://myproxy:8080"
--host-resolver-rules="MAP * 0.0.0.0 , EXCLUDE myproxy"
The first thing to check when debugging is look at the Proxy tab on about:net-internals, and verify what the effective proxy settings are:
chrome://net-internals/#proxy
Next, take a look at the DNS tab of about:net-internals to make sure Chrome isn't issuing local DNS resolves:
chrome://net-internals/#dns
Next, to trace the proxy logic for individual requests in Chrome take a look at the Events tab of about:net-internals:
chrome://net-internals/#events
Example Usage:
$ ssh -C2qTnN -D 8080 [email protected]
$ google-chrome --proxy-server="socks5://127.0.0.1:8080" --host-resolver-rules="MAP cache.pack.google.com 127.0.0.1,MAP clients1.google.com 127.0.0.1"
@josephbolus
Copy link
Author

josephbolus commented Nov 14, 2023

"MAP * ~NOTFOUND, EXCLUDE 127.0.0.1" Seems to have been deprecated as of Oct 2023. However, manually excluding hostnames still work, but presents a You are using an unsupported command-line flag: --host-resolver-rules="MAP cache.pack.google.com 127.0.0.1" Stability and security will suffer. warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment