Unconditionally call webRTCIPHandlingPolicy.clear() at launch

On Chromium-based browsers only.

Related issue/feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1928
- https://www.reddit.com/r/uBlockOrigin/comments/sl7p74/
This commit is contained in:
Raymond Hill 2022-02-05 12:04:08 -05:00
parent 8080048848
commit 00b257caa7
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 16 additions and 1 deletions

View File

@ -153,7 +153,22 @@ vAPI.browserSettings = (( ) => {
break; break;
case 'webrtcIPAddress': case 'webrtcIPAddress':
if ( this.canLeakLocalIPAddresses === false ) { return; } // https://github.com/uBlockOrigin/uBlock-issues/issues/1928
// https://www.reddit.com/r/uBlockOrigin/comments/sl7p74/
// Hypothetical: some browsers _think_ uBO is still using
// the setting possibly based on cached state from the
// past, and making an explicit API call that uBO is not
// using the setting appears to solve those unexpected
// reported occurrences of uBO interfering despite never
// using the API.
if ( this.canLeakLocalIPAddresses === false ) {
if ( vAPI.webextFlavor.soup.has('chromium') ) {
bp.network.webRTCIPHandlingPolicy.clear({
scope: 'regular',
});
}
return;
}
if ( !!details[setting] ) { if ( !!details[setting] ) {
bp.network.webRTCIPHandlingPolicy.clear({ bp.network.webRTCIPHandlingPolicy.clear({
scope: 'regular', scope: 'regular',