Skip to content
Snippets Groups Projects
Commit 32ca07ca authored by David Fifield's avatar David Fifield
Browse files

Set network.proxy.socks_remote_dns=false inside the Firefox helper.

We need this setting to be false in order for DNS lookups to work
outside of a proxy, when the extension is run in Tor Browser
(https://trac.torproject.org/projects/tor/ticket/11183#comment:6).

By setting the pref inside the extension, we don't rely on it being set
in the user.js file, where it can instead have its default value of
true, which is safer if the browser somehow runs without the extension.
https://trac.torproject.org/projects/tor/ticket/12674#comment:2
parent 52b9014c
No related branches found
No related tags found
No related merge requests found
......@@ -62,6 +62,14 @@ MeekHTTPHelper.prototype = {
return;
try {
var prefs = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
// Allow unproxied DNS, working around a Tor Browser patch:
// https://trac.torproject.org/projects/tor/ticket/11183#comment:6.
// We set TRANSPARENT_PROXY_RESOLVES_HOST whenever we are asked to
// use a proxy, so name resolution uses the proxy despite this pref.
prefs.setBoolPref("network.proxy.socks_remote_dns", false);
// https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIServerSocket
var serverSocket = Components.classes["@mozilla.org/network/server-socket;1"]
.createInstance(Components.interfaces.nsIServerSocket);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment