Skip to content

Instantly share code, notes, and snippets.

View nperez's full-sized avatar

nperez nperez

  • Amsterdam, The Netherlands
View GitHub Profile
@nperez
nperez / gist:5939373
Created July 6, 2013 09:31
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 {
for(int x = 0; x < 3; x++) {
if(this.getElement(x, 0) == this.getElement(x, 1) && this.getElement(x, 0) == this.getElement(x, 2)) {
return true;
}
}