-
Notifications
You must be signed in to change notification settings - Fork 163
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
WIP: Expand UDP Single Port mode (UDPMux) to ServerReflexive and Relay #403
Conversation
I've tested and when using higher number agents with type Relay and udpMux as I've implemented, the connections fail and I am a bit stuck here. The errors and warnings I see are:
|
When using multiple agents sharing the same port, packets are being dropped or routed to the wrong agents, it seems like I will have to work on UDPMuxDefault address and connection mappings. This is kind of tricky as STUN Binding Response doesn't carry much information that would allow for good mapping. The same goes for TURN protocol. |
@@ -1,3 +1,4 @@ | |||
//go:build !js |
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.
I am a bit confused about this build tag comment here. Whats the purpose of the // +build
comment?
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.
Just to keep compatibility with older versions as the new directive was introduced in Go v1.7
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.
@mlsmaycon Thanks :)
Hi @mlsmaycon, thanks for your great work on this :)
I guess we could simply use the STUN transaction ID to facilitate the mapping? As TURN just uses STUN methods, the packets send for TURN bindings also carry a STUN transaction ID. |
Thanks, @stv0g for your comments. I've tested a bit with Transactions ID and it could help us address the above issue but not all. I think we would need to work on the pion/turn package as well because packets sent from it wouldn't be tracked on ICE and a response from turn ends up going to the last udpMuxedConn that mapped the TURN server's IP. Also, mapping Transactions ID will require constant clean-up of the mapped IDs that weren't used (happens on check packets). Another point that I missed when creating the PR, was that using a single ufrag for creating the udpMuxedConn might also lead to responses being handled by the wrong candidates. @braginini is working on this PR as well. |
@stv0g @mlsmaycon Afterward, we could merge them. |
@braginini Having dedicated muxes per candidate type would force us to use the candidate type for all peers. As using mixed candidate types would leave us with multiple muxes, each with their own local address. (This could maybe be worked around with some NFtables redirects/rewrites?) |
Closing in favor of #419 |
Description
This PR adds support to ServerReflexive and Relay candidate types.
Reference issue
Fixes #400