Skip to content

Commit

Permalink
Unconditionally call webRTCIPHandlingPolicy.clear() at launch
Browse files Browse the repository at this point in the history
On Chromium-based browsers only.

Related issue/feedback:
- uBlockOrigin/uBlock-issues#1928
- https://www.reddit.com/r/uBlockOrigin/comments/sl7p74/
  • Loading branch information
gorhill committed Feb 5, 2022
1 parent 8080048 commit 00b257c
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion platform/common/vapi-background.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,22 @@ vAPI.browserSettings = (( ) => {
break;

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] ) {
bp.network.webRTCIPHandlingPolicy.clear({
scope: 'regular',
Expand Down

0 comments on commit 00b257c

Please sign in to comment.