[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [meek/master] Set network.proxy.socks_remote_dns=false inside the WebExtension.



commit ce6633c8be5a4b1d85106ef2ecc02cb29d97d9ac
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date:   Wed Feb 20 19:26:48 2019 -0700

    Set network.proxy.socks_remote_dns=false inside the WebExtension.
    
    This is to work around a Firefox patch that otherwise prevents DNS
    requests from being made when proxyType=="direct".
    
    Compare to
    https://gitweb.torproject.org/pluggable-transports/meek.git/commit/?id=32ca07ca008f5d09492f4d2782130bd54c52acf5
---
 webextension/background.js | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/webextension/background.js b/webextension/background.js
index 00500a0..7ad06fe 100644
--- a/webextension/background.js
+++ b/webextension/background.js
@@ -277,6 +277,22 @@ browser.webRequest.onBeforeRequest.addListener(
     ["blocking"]
 );
 
+// Allow unproxied DNS, working around a Tor Browser patch: https://bugs.torproject.org/11183#comment:6.
+// We manually override the proxy for every request, and in makeProxyInfo we set
+// proxyDNS:true wherever necessary, so name resolution uses the proxy despite
+// this pref.
+//
+// In Tor Browser, the pref changes here are only temporary. The
+// meek-http-helper profile has a user.js file that sets a default blackhole
+// proxy, as a safety feature in case something goes wrong running the headless
+// browser.
+//
+// We only care to set proxyDNS here, but must additionally set proxyType until
+// Firefox 63 because of a bug.
+// https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/proxy/settings
+// https://bugzilla.mozilla.org/show_bug.cgi?id=1487121
+browser.proxy.settings.set({value: {proxyType: "system", proxyDNS: false}});
+
 // Connect to our native process.
 let port = browser.runtime.connectNative("meek.http.helper");
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits