Use proxy detection code path only on Firefox 79 and less

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/911

This was fixed in Firefox 80:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1618271
This commit is contained in:
Raymond Hill 2020-10-14 13:37:09 -04:00
parent c227b8bd0c
commit 3059db77c4
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 13 additions and 11 deletions

View File

@ -125,6 +125,7 @@
this.cnameFlushTime = Date.now() + this.cnameMaxTTL * 60000; this.cnameFlushTime = Date.now() + this.cnameMaxTTL * 60000;
// https://github.com/uBlockOrigin/uBlock-issues/issues/911 // https://github.com/uBlockOrigin/uBlock-issues/issues/911
// Install/remove proxy detector. // Install/remove proxy detector.
if ( vAPI.webextFlavor.major < 80 ) {
const wrohr = browser.webRequest.onHeadersReceived; const wrohr = browser.webRequest.onHeadersReceived;
if ( cnameUncloak === false || cnameUncloakProxied ) { if ( cnameUncloak === false || cnameUncloakProxied ) {
if ( wrohr.hasListener(proxyDetector) ) { if ( wrohr.hasListener(proxyDetector) ) {
@ -139,6 +140,7 @@
} }
proxyDetectorTryCount = 32; proxyDetectorTryCount = 32;
} }
}
normalizeDetails(details) { normalizeDetails(details) {
if ( mustPunycode && !reAsciiHostname.test(details.url) ) { if ( mustPunycode && !reAsciiHostname.test(details.url) ) {
parsedURL.href = details.url; parsedURL.href = details.url;