mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 09:07:54 +01:00
Use disable_non_proxied_udp
for webRTCIPHandlingPolicy
The stricter mode `disable_non_proxied_udp` is preferable to `default_public_interface_only` to prevent local IP address leakage through WebRTC. This mode is properly supported since Firefox 70, so the less strict `default_public_interface_only` will now be used only for Firefox 69 and older.
This commit is contained in:
parent
be111c4036
commit
a1dabf3c1a
1 changed files with 8 additions and 6 deletions
|
@ -181,12 +181,14 @@ vAPI.browserSettings = (( ) => {
|
|||
// https://github.com/gorhill/uBlock/issues/3009
|
||||
// Firefox currently works differently, use
|
||||
// `default_public_interface_only` for now.
|
||||
bpn.webRTCIPHandlingPolicy.set({
|
||||
value: vAPI.webextFlavor.soup.has('chromium')
|
||||
? 'disable_non_proxied_udp'
|
||||
: 'default_public_interface_only',
|
||||
scope: 'regular',
|
||||
});
|
||||
// https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/privacy/network#Browser_compatibility
|
||||
// Firefox 70+ supports `disable_non_proxied_udp`
|
||||
const value =
|
||||
vAPI.webextFlavor.soup.has('firefox') &&
|
||||
vAPI.webextFlavor.major < 70
|
||||
? 'default_public_interface_only'
|
||||
: 'disable_non_proxied_udp';
|
||||
bpn.webRTCIPHandlingPolicy.set({ value, scope: 'regular' });
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue