[tor-commits] [meek/master] Set a webRequest.onErrorOccurred error logger.
dcf at torproject.org
dcf at torproject.org
Wed Aug 28 05:59:18 UTC 2019
commit 50f0d0b8a225befaf0d560d18a4df2ba30096f97
Author: David Fifield <david at bamsoftware.com>
Date: Wed Feb 20 19:40:46 2019 -0700
Set a webRequest.onErrorOccurred error logger.
This is what enabled me to find the proxyDNS problem fixed by the
previous commit. Without it, there was no error message in the browser
console.
---
webextension/background.js | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/webextension/background.js b/webextension/background.js
index 7ad06fe..d5bbac7 100644
--- a/webextension/background.js
+++ b/webextension/background.js
@@ -277,6 +277,12 @@ browser.webRequest.onBeforeRequest.addListener(
["blocking"]
);
+// Set a top-level error logger for webRequest, to aid debugging.
+browser.webRequest.onErrorOccurred.addListener(
+ details => console.log(`${browser.runtime.id}: webRequest error:`, details),
+ {urls: ["http://*/*", "https://*/*"]}
+);
+
// 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
More information about the tor-commits
mailing list