Skip to content

Which ports used for direct connection #470

Discussion options

You must be logged in to vote

Hi,
Even if some WebRTC agents can use a local TCP connection where one device listens and one device connects (Firefox supports it, libdatachannel supports it only with libnice backend), that's not how WebRTC connections are open in general. WebRTC primarily uses UDP and relies on ICE to traverse both NATs and firewalls.

For firewalls, the idea is that the connection is negotiated and open from both sides at the same time, meaning UDP datagrams are send from each side to establish the connection. Therefore, firewalls on each side will consider the remote connection attempt as an answer to the local connection attempt.

By default any available port above 1024 may be used, but there are se…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@glynj-bsquare
Comment options

Answer selected by glynj-bsquare
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants