Skip to content

Conversation

@gammelby
Copy link
Member

No description provided.

@fusionfoxy
Copy link
Member

As I read the documentation, to determine if the connection is relay, we should:

  1. look for the ´transport` report in the stats report
  2. if it does not exist, we may be in Firefox where it is not supported, so we should look for a candidate-pairreport where the report is selected
  3. The selected bit only exist in FireFox as an alternative to the transport report. So if we get to this point and we have not found the correct candidate-pair, it should not exist and we should give up.
  4. If we have found the selected pair, we check if it is relay.

In the algorithm implemented in this PR, we also in step 2 we also check if the report is nominated. As I see it, we should not need to look for this. However, if we do want to look for this, we need to find all candidate pairs that is nominated, and pick the one with the highest priority using this algorithm: https://datatracker.ietf.org/doc/html/rfc5245#section-5.7.2

Finally if all else fails, this PR looks for any candidate pair which is succeeded. This should be an unnecessary fallback.
In my opinion, if we need to fallback to whatever is succeeded, we really have no idea which pair will be used, and we should just return unknown.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants