Update webRTCIPHandlingPolicy to match Chrome behavior
Categories
(WebExtensions :: Compatibility, enhancement, P2)
Tracking
(firefox70 verified)
Tracking | Status | |
---|---|---|
firefox70 | --- | verified |
People
(Reporter: drno, Assigned: ralderete, NeedInfo)
References
Details
(Keywords: dev-doc-complete)
Attachments
(3 files)
Comment hidden (mozreview-request) |
Reporter | ||
Updated•7 years ago
|
Reporter | ||
Comment 2•7 years ago
|
||
Comment 3•7 years ago
|
||
mozreview-review |
Comment 5•7 years ago
|
||
mozreview-review |
Updated•7 years ago
|
Updated•7 years ago
|
Reporter | ||
Comment 6•7 years ago
|
||
Comment 7•7 years ago
|
||
Reporter | ||
Comment 8•7 years ago
|
||
Comment 9•7 years ago
|
||
Reporter | ||
Comment 10•7 years ago
|
||
Comment 11•7 years ago
|
||
Reporter | ||
Comment 12•7 years ago
|
||
Comment 13•7 years ago
|
||
Comment 14•7 years ago
|
||
Comment 15•7 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Reporter | ||
Comment 16•7 years ago
|
||
Assignee | ||
Comment 18•6 years ago
|
||
Previously, the network.webRTCIPHandlingPolicy "disable_non_proxied_udp" only
enabled the use of WebRTC if a proxy was configured and the WebRTC service
supported TURN TCP.
This aims to match Chrome's behavior by forcing the use of a proxy if one is
configured, otherwise falling back to mode 3 (default route only).
Assignee | ||
Updated•6 years ago
|
Comment 19•6 years ago
|
||
This will need a doc change on the webextension privacy api page.
This should probably also be release noted somehow for extension devs, perhaps also as a part of a blog update? (@Fallen)
Comment 20•6 years ago
|
||
Comment 21•6 years ago
|
||
bugherder |
Comment 22•6 years ago
|
||
Hello,
Will this fix require manual validation? If yes, please provide some steps to reproduce in order to correctly test it and also, please set the "qe-verify+" flag. Otherwise, could the "qe-verify-" flag be added? Thanks!
Assignee | ||
Comment 23•6 years ago
|
||
Yes, this will likely require manual validation.
Prior to this fix, the "disable_non_proxied_udp" API setting for "network.webRTCIPHandlingPolicy" (equivalent to setting the "media.peerconnection.ice.proxy_only" preference to true) would only allow WebRTC if the user had a proxy configured AND the web application provided a TURN server.
After this fix, "disable_non_proxied_udp" (now equivalent to turning on the preferences "media.peerconnection.ice.default_address_only", "media.peerconnection.ice.no_host", and "media.peerconnection.ice.proxy_only_if_behind_proxy") should offer the same level of WebRTC functionality as the API setting "default_public_interface_only" when the user does not have a proxy configured. The case where a proxy is configured does not change.
The added "proxy_only" API setting offers the same behavior as the old "disable_non_proxied_udp" API setting.
The exact behavior can be validated using something like the Trickle ICE test page (https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/) to verify that the same types of candidates are gathered for each API setting/preference configuration that is supposed to produce equivalent results.
If verifying functional equivalency to Chrome is all that is desired, then use one of the WebRTC samples to ensure that WebRTC can still be used when the "disable_non_proxied_udp" API setting is on and (1) no proxy is configured, (2) no TURN server is provided by the application, or (1) and (2).
Assignee | ||
Updated•6 years ago
|
Comment 24•6 years ago
|
||
First of all it should be noted that the way we've tested the "proxy configured" requirement in order to try and reproduce the issue was through using the FireX Proxy extension (https://addons.mozilla.org/en-US/firefox/addon/firex-proxy/?src=search).
Knowing that, we tried on Firefox 69.0a1 /20190703162038 to set the "media.peerconnection.ice.proxy_only" preference to true, the proxy applied to one foreign country and used the https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/ site.
Over there we added a Turn server (url: 'turn:numb.viagenie.ca',
credential: 'muazkh',username: 'webrtc@live.com') and clicked on the "Gather candidates" button while also watching the results in the console.
No candidates were found and the following error message was received "ICE failed, your TURN server appears to be broken, see about:webrtc for more details" when trying to test with 4 more Turn server addresses.
This message is in fact received all the time as long as the preference is turned on.
On Firefox 70.0a1/ 20190901094958, after turning on the preferences ("media.peerconnection.ice.default_address_only", "media.peerconnection.ice.no_host", and "media.peerconnection.ice.proxy_only_if_behind_proxy") with no proxy configured and no Turn server added, we did not receive any candidates.
Console output was the following:
Creating new PeerConnection with config={"iceServers":[{"urls":["stun:l.google.com:19302"],"username":"","credential":""}],"iceTransportPolicy":"all","iceCandidatePoolSize":"0"}
Again, no candidates even after addding a TURN server, with or without adding a proxy through the extension- see console output.
Creating new PeerConnection with config={"iceServers":[{"urls":["stun:l.google.com:19302"],"username":"","credential":""},{"urls":["turn:13.250.13.83:3478?transport=udp"],"username":"YzYNCouZM1mhqhmseWk6","credential":"YzYNCouZM1mhqhmseWk6"}],"iceTransportPolicy":"all","iceCandidatePoolSize":"0"}
All in all, we can't confirm that the results are equivalent, since on FF69 an error is received, but on FF70 no candidates are found when testing.
Could it be that we're doing something wrong and if so, could you give us a step by step method of testing?
thank you
Assignee | ||
Comment 25•6 years ago
•
|
||
Your method seems mostly correct; I just have a few observations.
TURN requests are going to be sent over UDP unless the TURN server has been configured to use TCP. The "proxy_only" preference essentially disables the use of UDP, so that can explain the error that is received in that case. I'm not entirely sure where Firefox is when it comes to sending TURN-TCP through an HTTP proxy. This patch wasn't meant to change the behavior of the "proxy_only" preference at all, so my interpretation of it may not be entirely correct.
I'm unable to reproduce what happened to you with the preferences ("media.peerconnection.ice.default_address_only", "media.peerconnection.ice.no_host", and "media.peerconnection.ice.proxy_only_if_behind_proxy") turned on. Is it possible that the "media.peerconnection.ice.proxy_only" preference was also turned on? That preference is the stricter one and would override the others. With those 3 preferences enabled, the "proxy_only" one disabled, and the Google STUN server left in, I would expect the following:
no proxy + no TURN: srflx
proxy + no TURN: same as "proxy_only" + proxy + no TURN *
no proxy + TURN: srflx, relay
proxy + TURN: same as "proxy_only" + proxy + TURN *
* With how your TURN server is configured, you might get the error here
Let me know if you have more questions.
Comment 26•6 years ago
|
||
Hello,
Based on the information you have provided, we have set up the testing environment in the following way:
media.peerconnection.ice.default_address_only
,media.peerconnection.ice.no_host
andmedia.peerconnection.ice.proxy_only_if_behind_proxy
were turned ONmedia.peerconnection.ice.proxy_only
was made sure to be turned OFF- FireX Proxy extension (https://addons.mozilla.org/en-US/firefox/addon/firex-proxy/?src=search) has been installed
- the Google STUN server was left in throughout all tests carried out via https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/
- 3 TURN servers were used to carry out the tests:
- url: turn:numb.viagenie.ca / credential: muazkh / username: webrtc@live.com
- url: turn:192.158.29.39:3478?transport=udp / credential: JZEOEt2V3Qb0y27GRntt2u2PAYA= / username: 28224511:1379330808
- url: turn:192.158.29.39:3478?transport=tcp / credential: JZEOEt2V3Qb0y27GRntt2u2PAYA= / username: 28224511:1379330808
These are the results we have obtained per use of TURN servers:
Via turn:numb.viagenie.ca
:
no proxy + no TURN → only srflx
no proxy + TURN → srflx + relay
proxy + no TURN → “ICE failed, add a TURN server and see about:webrtc for more details” error in console + no candidates were gathered
proxy+ TURN → “ICE failed, your TURN server appears to be broken, see about:webrtc for more details” error in console + no candidates were gathered
Via turn:192.158.29.39:3478?transport=udp
:
no proxy + no TURN → only srflx
no proxy + TURN → only srflx
proxy + no TURN → “ICE failed, add a TURN server and see about:webrtc for more details” error in console + no candidates were gathered
proxy + TURN →”ICE failed, your TURN server appears to be broken, see about:webrtc for more details” error in console + no candidates were gathered
Via turn:192.158.29.39:3478?transport=tcp
:
no proxy + no TURN → only srflx
no proxy + TURN → only srflx
proxy + no TURN → “ICE failed, add a TURN server and see about:webrtc for more details” error in console + no candidates were gathered
proxy + TURN → no candidates were gathered
While media.peerconnection.ice.proxy_only
IS ACTIVE:
no proxy + no TURN → “ICE failed, add a TURN server and see about:webrtc for more details” in console + no candidates were gathered
no proxy + TURN (UDP) →”ICE failed, your TURN server appears to be broken, see about:webrtc for more details” error in console + no candidates were gathered
proxy + TURN (UDP) → “ICE failed, your TURN server appears to be broken, see about:webrtc for more details” error in console + no candidates were gathered
proxy + no TURN (UDP) → ”ICE failed, add a TURN server and see about:webrtc for more details” error in console + no candidates were gathered
no proxy + TURN (TCP) → ”ICE failed, your TURN server appears to be broken, see about:webrtc for more details” error in console + no candidates were gathered
proxy + TURN (TCP) → no errors, but no candidates were gathered
proxy + no TURN (TCP) → ”ICE failed, add a TURN server and see about:webrtc for more details” error in console + no candidates were gathered
The tests were performed on the latest Nightly version (71.0a1 / 20190909214621) under Windows 10 Pro 64-bit and macOS High Sierra 10.13.6.
Please let us know whether these results are correct/expected under the circumstances mentioned above. Thanks !
Assignee | ||
Comment 27•6 years ago
|
||
Yes, those results appear consistent with my expectations for each of the given circumstances.
Comment 28•6 years ago
|
||
Hello,
Thanks Ryan ! Based on your comment above, closing the issue as Verified Fixed.
Comment 29•5 years ago
|
||
I'm going to need some help figuring out how to document this, but I'm happy to mention it!
Comment 30•5 years ago
|
||
I have documentation updates in flight; I've added the new flag to the list on the page for privacy.network
and hope to add actual explanations for each of the values shortly after checking on a couple things; that's not part of this issue directly so I'm clearing the DDN status.
I've also got a BCD update that adds a note about the change in Firefox 70.
Comment 31•5 years ago
|
||
I will ask here, though, if anyone could help me clarify my understanding of the permitted values for this setting. Finding actual explanations has been impossible; everything is just conversions of one obscure constant name to another from library to library. :D
I think I'm close to getting these right but could really use confirmations and corrections before I add descriptions to the docs. My current best guesses are:
default - Everything is handled the browser's default way
default_public_and_private_interfaces - if the device has multiple interfaces, use only the default ones; no proxy required; both public and private interfaces allowed
--> Question: I think "private interface" here means a host interface, but I could be wrong, in which case what does it mean? VPN? An interface that can't be pinged?
default_public_interface_only - same as default_public_and_private_interfaces but no host interfaces allowed
disable_non_proxied_udp - same as default_public_interface_only but also requires the use of a proxy if the UA has one configured
proxy_only - only proxied connections are permitted (requires TURN on TCP)
Let me know where I'm wrong here; would like to be sure this information is included in the docs instead of just a simple list of these flags.
Comment 32•5 years ago
|
||
(In reply to Eric Shepherd [:sheppy] from comment #31)
I will ask here, though, if anyone could help me clarify my understanding of the permitted values for this setting. Finding actual explanations has been impossible; everything is just conversions of one obscure constant name to another from library to library. :D
I think I'm close to getting these right but could really use confirmations and corrections before I add descriptions to the docs. My current best guesses are:
default - Everything is handled the browser's default way
default_public_and_private_interfaces - if the device has multiple interfaces, use only the default ones; no proxy required; both public and private interfaces allowed
--> Question: I think "private interface" here means a host interface, but I could be wrong, in which case what does it mean? VPN? An interface that can't be pinged?
default_public_interface_only - same as default_public_and_private_interfaces but no host interfaces allowed
disable_non_proxied_udp - same as default_public_interface_only but also requires the use of a proxy if the UA has one configured
proxy_only - only proxied connections are permitted (requires TURN on TCP)
Let me know where I'm wrong here; would like to be sure this information is included in the docs instead of just a simple list of these flags.
The canonical explanation of these modes is in ietf-rtcweb-ip-handling. default
, default_public_and_private_interfaces
, default_public_interface_only
and disable_non_proxied_udp
map to mode 1
, mode 2
, mode 3
and mode 4
, respectively.
proxy_only
is our old version of mode 4
, prior to this bug, that was not entirely up to spec in that it disallows any peer connection from connecting if a proxy is not set. There's still some value in this mode, since it's the only mode that guarantees that no ip addresses leak to remote peer or application, regardless of other settings (proxy).
Not sure if you read all bugmail, so setting needinfo as an FYI.
Description
•