Comments on: WebRTC TURN: Why you NEED it and when you DON’T need it https://bloggeek.me/webrtc-turn/ The leading authority on WebRTC Sun, 22 Oct 2023 18:53:12 +0000 hourly 1 By: Tsahi Levent-Levi https://bloggeek.me/webrtc-turn/#comment-165824 Sun, 22 Oct 2023 18:53:12 +0000 https://bloggeek.me/?p=72251#comment-165824 In reply to Konstantin Domashnev.

WebRTC and ICE (inside WebRTC). You can't change them.

]]>
By: Konstantin Domashnev https://bloggeek.me/webrtc-turn/#comment-165820 Sun, 22 Oct 2023 16:58:10 +0000 https://bloggeek.me/?p=72251#comment-165820 In reply to Tsahi Levent-Levi.

Who (WebRTC itself?) set the priorities and how we can set change them?

]]>
By: Tsahi Levent-Levi https://bloggeek.me/webrtc-turn/#comment-165819 Sun, 22 Oct 2023 10:22:54 +0000 https://bloggeek.me/?p=72251#comment-165819 In reply to Konstantin.

Each ICE candidate has a priority and based on that pairs are selected.
If more than a single candidate pair gets connected, then the ICE algorithm will end up selecting the one to use based on the priority.
It all boils down to ICE preferring direct over relay, UDP over TCP and TCP over TLS (all based on how the priorities are allocated).

]]>
By: Konstantin https://bloggeek.me/webrtc-turn/#comment-165818 Sun, 22 Oct 2023 10:17:27 +0000 https://bloggeek.me/?p=72251#comment-165818 Could you explain who choose the protocol to use for connection (UDP, TCP or TLS) peer or TURN?

I thought peer's webRTC follows the priorities: first direct IP, then IP with help of STUN, and finally via TURN. And then protocols: first UDP, then TCP and finally TLS.

Right?

]]>
By: Konstantin https://bloggeek.me/webrtc-turn/#comment-165797 Fri, 20 Oct 2023 16:28:13 +0000 https://bloggeek.me/?p=72251#comment-165797 In reply to Tsahi Levent-Levi.

Got it! Thank you so much! 🙂

]]>
By: Tsahi Levent-Levi https://bloggeek.me/webrtc-turn/#comment-165796 Fri, 20 Oct 2023 16:15:05 +0000 https://bloggeek.me/?p=72251#comment-165796 In reply to Konstantin.

Yes. Exactly. It will use UDP, TCP or TLS for the client it serves in order to traverse the firewall and on the other side of it, it will just use UDP.

]]>
By: Konstantin https://bloggeek.me/webrtc-turn/#comment-165795 Fri, 20 Oct 2023 16:03:44 +0000 https://bloggeek.me/?p=72251#comment-165795 In reply to Tsahi Levent-Levi.

So TURN can relay a stream using TCP/TLS connection to the peer and UDP connection to media server at the same time?
Is it like "changing the transport" at TURN server?

]]>
By: Tsahi Levent-Levi https://bloggeek.me/webrtc-turn/#comment-165794 Fri, 20 Oct 2023 13:51:50 +0000 https://bloggeek.me/?p=72251#comment-165794 In reply to Konstantin.

The connection between the TURN server and the media server is likely to be UDP based. You need to make sure both are reachable to one another over UDP, which shouldn't be a real challenge since you control or own both anyway.

The same can be said to apply to P2P as well – usually, one peer will be reachable via UDP to the TURN server and the other will be the one using a relay over TCP or TLS (of UDP isn't possible).

]]>
By: Konstantin https://bloggeek.me/webrtc-turn/#comment-165793 Fri, 20 Oct 2023 13:48:21 +0000 https://bloggeek.me/?p=72251#comment-165793 Thank you for the great article!

You mentioned that TURN might be necessary even using media server because of it's lack of TCP/TLS support.

So in case of TCP/TLS connection streams will go from peers to TURN, than to media server and backwards. Right?

What type of connection will be between TURN and media server (SFU 1:1) in this case? UDP?

]]>
By: Vinod https://bloggeek.me/webrtc-turn/#comment-165150 Wed, 23 Aug 2023 15:51:26 +0000 https://bloggeek.me/?p=72251#comment-165150 In reply to Tsahi Levent-Levi.

Got it. Thanks for your prompt response!

]]>