mirror of https://github.com/gorhill/uBlock.git
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:
parent
c227b8bd0c
commit
3059db77c4
|
@ -125,19 +125,21 @@
|
||||||
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.
|
||||||
const wrohr = browser.webRequest.onHeadersReceived;
|
if ( vAPI.webextFlavor.major < 80 ) {
|
||||||
if ( cnameUncloak === false || cnameUncloakProxied ) {
|
const wrohr = browser.webRequest.onHeadersReceived;
|
||||||
if ( wrohr.hasListener(proxyDetector) ) {
|
if ( cnameUncloak === false || cnameUncloakProxied ) {
|
||||||
wrohr.removeListener(proxyDetector);
|
if ( wrohr.hasListener(proxyDetector) ) {
|
||||||
|
wrohr.removeListener(proxyDetector);
|
||||||
|
}
|
||||||
|
} else if ( wrohr.hasListener(proxyDetector) === false ) {
|
||||||
|
wrohr.addListener(
|
||||||
|
proxyDetector,
|
||||||
|
{ urls: [ '*://*/*' ] },
|
||||||
|
[ 'blocking' ]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} else if ( wrohr.hasListener(proxyDetector) === false ) {
|
proxyDetectorTryCount = 32;
|
||||||
wrohr.addListener(
|
|
||||||
proxyDetector,
|
|
||||||
{ urls: [ '*://*/*' ] },
|
|
||||||
[ 'blocking' ]
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
proxyDetectorTryCount = 32;
|
|
||||||
}
|
}
|
||||||
normalizeDetails(details) {
|
normalizeDetails(details) {
|
||||||
if ( mustPunycode && !reAsciiHostname.test(details.url) ) {
|
if ( mustPunycode && !reAsciiHostname.test(details.url) ) {
|
||||||
|
|
Loading…
Reference in New Issue