-
-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Protect against WebRTC leaking private IP address #969
Conversation
Given the dates in https://en.wikipedia.org/wiki/Google_Chrome_version_history, we should probably be good supporting Chrome 48+ only (when |
@gorhill notes there are some issues when this setting is enabled. Is that no longer the case? Generally speaking, what are the downsides of setting WebRTC's IP handling policy to "default_public_interface_only"? Less efficient communication when all peers are on the same network? |
@cooperq and I tested Google Hangouts with it enabled, and didn't encounter any issues. I haven't yet noticed any issues running it with this setting enabled, so perhaps we can wait for some reports to come in if it is an issue for certain users. Also, you guys can potentially run with it for a bit and see if anything breaks, though my initial test drive hasn't revealed anything. As to the downsides, that's essentially my understanding of it. The specification goes into greater detail about the four modes (which correspond to the four settings that Chrome offers as mentioned above):
I took a closer look into how others are handling this, and found that Yan Zhu from Brave decided to pick
I think for us this might be overkill, as we plan to release this without the ability to toggle the setting initially, and picking the most private option which has the largest impact on quality might be overkill (note that Brave doesn't have WebRTC protection on by default, and only enables it when "Fingerprint Protection Mode" is turned on). |
@groovecoder can you look up how to do this in firefox? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to have code added to support firefox in web extensions mode. @groovecoder is looking into this.
@@ -168,6 +168,18 @@ Badger.prototype = { | |||
setInterval(this.updateCookieBlockList, utils.oneDay()); | |||
}, | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs doc comment
Firefox has not implemented the Web Extensions privacy API yet. I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1312802 for it. uBlock uses the media.peerconnection.ice.default_address_only config to achieve the same effect. Firefox does not (yet) have a way for Web Extension add-ons to set config values. I would hate to block this improvement for Chrome users, so I suggest we go ahead and approve this PR and file a follow-up issue for Firefox? Are we filing Firefox/Web Extension issues here, or in the Firefox repo? Ignoring the Web Extension code for now ... I could make a corresponding PR to the Firefox repo too maybe? |
@groovecoder Thanks for looking into this! @cooperq put the Firefox repo on a feature freeze, so any new changes can be included here. Since Web Extensions doesn't yet support this, is it possible for us to add support for Firefox directly within this function call, or would it have to go somewhere else in the code to be compatible? |
Return early if browser doesn't implement chrome.privacy
Good to know! The check for |
Retitled to make more clear this doesn't protect against WebRTC-powered tracking, just local/private IP address leakage. |
LGTM |
FWIW, I plan to try implementing |
@groovecoder cool! Let us know when you have done that! |
I sat with WebExtensions Experiments gurus here at Mozilla work-week and it's not possible right now. :( But it needs to be possible for many reasons, so I'll keep on it. |
Thanks for the update on this, and thanks for continuing to push for the implementation of this API! |
@cooperq @ghostwords @pde Here's the updated implementation of WebRTC protection.
A few points of note:
default_public_interface_only
hides the local IP address.chrome.runtime.lastError
, sayinglastError
needs to be checked or Chrome complains (see Chromium gets error from ublock0 with hyperlink auditing and locks up the extension. gorhill/uBlock#875), but from my testing this doesn't seem to be an issue anymore.default
,default_public_and_private_interfaces
,default_public_interface_only
anddisable_non_proxied_udp
. I think that this last option might end up breaking some things, so the 3rd option seems safe. In case the user already has this fourth option selected, I've followed uBlock's approach and kept their setting as is.You can test this on https://diafygi.github.io/webrtc-ips/ and https://ipleak.net/.