[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [meek/master] Set a webRequest.onErrorOccurred error logger.
commit 50f0d0b8a225befaf0d560d18a4df2ba30096f97
Author: David Fifield <david@xxxxxxxxxxxxxxx>
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
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits