aboutsummaryrefslogtreecommitdiffstats
path: root/platform
diff options
context:
space:
mode:
authorgorhill <rhill@raymondhill.net>2015-06-24 20:01:27 -0400
committergorhill <rhill@raymondhill.net>2015-06-24 20:01:27 -0400
commit1ba7894a299372d0baf5599d22e0617a7ab37e29 (patch)
treef165d7ba6f35871a09eb76fcb7de17e85085142b /platform
parentc596e6c0e1cedd23d9d80d02daf8d8d57aae70db (diff)
downloaduBlock-1ba7894a299372d0baf5599d22e0617a7ab37e29.zip
uBlock-1ba7894a299372d0baf5599d22e0617a7ab37e29.tar.gz
uBlock-1ba7894a299372d0baf5599d22e0617a7ab37e29.tar.bz2
ability to prevent local ip address leak thru webrtc
Diffstat (limited to 'platform')
-rw-r--r--platform/chromium/vapi-background.js9
-rw-r--r--platform/firefox/vapi-background.js10
2 files changed, 19 insertions, 0 deletions
diff --git a/platform/chromium/vapi-background.js b/platform/chromium/vapi-background.js
index 3d0ccaf..9413033 100644
--- a/platform/chromium/vapi-background.js
+++ b/platform/chromium/vapi-background.js
@@ -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;
}
diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js
index 67fa567..3d73648 100644
--- a/platform/firefox/vapi-background.js
+++ b/platform/firefox/vapi-background.js
@@ -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;
}