mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 01:02:08 +01:00
ability to prevent local ip address leak thru webrtc
This commit is contained in:
parent
c596e6c0e1
commit
1ba7894a29
8 changed files with 37 additions and 2 deletions
|
@ -85,6 +85,15 @@ vAPI.browserSettings = {
|
|||
});
|
||||
break;
|
||||
|
||||
case 'webrtcIPAddress':
|
||||
if ( typeof chrome.privacy.network.webRTCMultipleRoutesEnabled === 'object' ) {
|
||||
chrome.privacy.network.webRTCMultipleRoutesEnabled.set({
|
||||
value: !!details[setting],
|
||||
scope: 'regular'
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -195,6 +195,16 @@ vAPI.browserSettings = {
|
|||
}
|
||||
break;
|
||||
|
||||
case 'webrtcIPAddress':
|
||||
this.rememberOriginalValue('media.peerconnection', 'enabled');
|
||||
value = !!details[setting];
|
||||
if ( value === true ) {
|
||||
this.clear('media.peerconnection', 'enabled');
|
||||
} else {
|
||||
this.setBool('media.peerconnection', 'enabled', false);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -183,6 +183,10 @@
|
|||
"message":"Disable hyperlink auditing/beacon",
|
||||
"description":"English: "
|
||||
},
|
||||
"settingsWebRTCIPAddressHiddenPrompt":{
|
||||
"message":"Prevent WebRTC from leaking local IP address",
|
||||
"description":"English: "
|
||||
},
|
||||
"settingsExperimentalPrompt":{
|
||||
"message":"Enable experimental features (<a href='https:\/\/github.com\/gorhill\/uBlock\/wiki\/Experimental-features'>About<\/a>)",
|
||||
"description":"English: Enable experimental features"
|
||||
|
|
|
@ -65,7 +65,8 @@ return {
|
|||
parseAllABPHideFilters: true,
|
||||
prefetchingDisabled: true,
|
||||
requestLogMaxEntries: 1000,
|
||||
showIconBadge: true
|
||||
showIconBadge: true,
|
||||
webrtcIPAddressHidden: false
|
||||
},
|
||||
|
||||
// https://github.com/chrisaljoudi/uBlock/issues/180
|
||||
|
|
|
@ -204,6 +204,12 @@ var onUserSettingsReceived = function(details) {
|
|||
changeUserSettings('hyperlinkAuditingDisabled', this.checked);
|
||||
});
|
||||
|
||||
uDom('#webrtc-ipaddress-hidden')
|
||||
.prop('checked', details.webrtcIPAddressHidden === true)
|
||||
.on('change', function(){
|
||||
changeUserSettings('webrtcIPAddressHidden', this.checked);
|
||||
});
|
||||
|
||||
uDom('#experimental-enabled')
|
||||
.prop('checked', details.experimentalEnabled === true)
|
||||
.on('change', function(){
|
||||
|
|
|
@ -159,7 +159,8 @@ var onUserSettingsReady = function(fetched) {
|
|||
µb.contextMenu.toggle(userSettings.contextMenuEnabled);
|
||||
vAPI.browserSettings.set({
|
||||
'hyperlinkAuditing': !userSettings.hyperlinkAuditingDisabled,
|
||||
'prefetching': !userSettings.prefetchingDisabled
|
||||
'prefetching': !userSettings.prefetchingDisabled,
|
||||
'webrtcIPAddress': !userSettings.webrtcIPAddressHidden
|
||||
});
|
||||
|
||||
µb.permanentFirewall.fromString(fetched.dynamicFilteringString);
|
||||
|
|
|
@ -279,6 +279,9 @@ var matchWhitelistDirective = function(url, hostname, directive) {
|
|||
case 'prefetchingDisabled':
|
||||
vAPI.browserSettings.set({ 'prefetching': !value });
|
||||
break;
|
||||
case 'webrtcIPAddressHidden':
|
||||
vAPI.browserSettings.set({ 'webrtcIPAddress': !value });
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
<li class="subgroup"><span data-i18n="3pGroupPrivacy"></span><ul>
|
||||
<li><input id="prefetching-disabled" type="checkbox"><label data-i18n="settingsPrefetchingDisabledPrompt" for="prefetching-disabled"></label> <a class="fa info" href="https://wikipedia.org/wiki/Link_prefetching#Issues_and_criticisms" target="_blank"></a>
|
||||
<li><input id="hyperlink-auditing-disabled" type="checkbox"><label data-i18n="settingsHyperlinkAuditingDisabledPrompt" for="hyperlink-auditing-disabled"></label> <a class="fa info" href="http://www.wilderssecurity.com/threads/hyperlink-auditing-aka-a-ping-and-beacon-aka-navigator-sendbeacon.364904/" target="_blank"></a>
|
||||
<li><input id="webrtc-ipaddress-hidden" type="checkbox"><label data-i18n="settingsWebRTCIPAddressHiddenPrompt" for="webrtc-ipaddress-hidden"></label>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
|
Loading…
Reference in a new issue