Skip to content

Instantly share code, notes, and snippets.

@nperez
Created July 6, 2013 09:31
Show Gist options
  • Save nperez/5939373 to your computer and use it in GitHub Desktop.
Save nperez/5939373 to your computer and use it in GitHub Desktop.
Want to make Chrome tunnel DNS via SOCKS5 proxies when you have FoxyProxy configured to use pre-defined patterns and priorities? Patch.
:!diff -u js/proxyManager.js js/proxyManager-mine.js
--- js/proxyManager.js 2013-07-06 11:27:25.000000000 +0200
+++ js/proxyManager-mine.js 2013-07-06 11:26:41.000000000 +0200
@@ -176,7 +176,7 @@
case "manual":
if (!proxy.data.pac || proxy.data.pac.length == 0) {
console.log("regular proxy manual used");
- proxyStr = '"' + (proxy.data.isSocks ? "SOCKS " : "PROXY ") + proxy.data.host + ":" + proxy.data.port + '"';
+ proxyStr = '"' + (proxy.data.isSocks ? (proxy.data.socks == 5 ? "SOCKS5 " : "SOCKS ") : "PROXY ") + proxy.data.host + ":" + proxy.data.port + '"';
} else {
console.log("Manual mode set and using remote PAC");
c += " function wrapper(url, host){ " + proxy.data.pac + " return FindProxyForURL(url, host); }", proxyStr = "wrapper(url, host)";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment