Skip to content
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

Ignore USE-CANDIDATE to accommodate clients that do agressive ICE nomination #650

Open
havfo opened this issue Sep 3, 2021 · 2 comments
Labels
Milestone

Comments

@havfo
Copy link

havfo commented Sep 3, 2021

Feature Request

Firefox uses agressive ICE nomination when communicating with an ICE-lite peer (Mediasoup) Bugzilla. This breaks transports under certain scenarios (e.g. blocked inbound UDP, but open outbound UDP). This is not the correct behaviour from Firefox, but it seems this will not be fixed in the forseable future, and it would be beneficial to have Firefox not be at a disadvantage if possible.

A proposal for a solution is to ignore USE-CANDIDATE from the client and just use the last valid tuple instead. This would fix Firefox and should not impact other browsers.

A simple POC I did (I removed the code blocks that check USE-CANDIDATE in all the switch cases like this one: hasUseCandidate) shows it to have seemingly fixed Firefox and didn't break Chrome.

A problem with this approach is that you would loose the distinction between the ICE CONNECTED and COMPLETED states. As far as my cursory glance at the code base can reveal, this should not impact any code paths within the worker code, but I could be wrong here.

@ibc
Copy link
Member

ibc commented Jun 23, 2022

Reminder for @jmillan and me to take a look to this.

@jimying
Copy link

jimying commented Jul 12, 2022

I ran into this problem recently, firefox webrtc can not work in some network scene, but use ice-relay can work.
(The webrtc server side use ice-lite)

I have an idea :
When receive stun binding request first time and contains USE-CANDIDATE, after stun response,
mark it as pending nominate.

Then send stun binding to peer, only when receive response ok, set state to nominated.

It should work for firefox/chrome/safari. The disadvantage is that there will be a little delay(one more trip)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants