One RTCPeerConnection to local TURN server to local TCP/UDP server back to single Data Channel?

59 views
Skip to first unread message

guest271314

unread,
Jul 6, 2025, 11:44:13 PMJul 6
to discuss-webrtc
If I'm reading this https://datatracker.ietf.org/doc/html/rfc5766 and this https://datatracker.ietf.org/doc/html/rfc6062 correctly, it's possible to connect to a *local* TURN server (TCP socket) with something like this alone https://webrtc.org/getting-started/turn-server

```
const iceConfiguration = {
    iceServers: [
        {
            urls: 'turn:my-turn-server.mycompany.com:19403',
            username: 'optional-username',
            credential: 'auth-token'
        }
    ]
}

const peerConnection = new RTCPeerConnection(iceConfiguration);
```

and thereafter communicate directly with a local TCP or UDP socket, that can be sent back to WebRTC Data Channels https://datatracker.ietf.org/doc/html/rfc8831, negating the need for a second `RTCPeerConnection` to communicate directly with a local TCP or UDP socket through a local TURN server relay?

shakeeb nazmus

unread,
Jul 9, 2025, 7:16:56 AMJul 9
to discuss-webrtc
The question is not very clear. WebRTC doesn't support RFC6062. 
If the local TURN server means  TURN server running on the local IP address without external mapping then It has no practical use cases, especially in real-world WebRTC deployments.

Thanks,
Shakeeb

guest271314

unread,
Jul 9, 2025, 10:25:30 AMJul 9
to discuss...@googlegroups.com
Basically, connect a local RTCPeerConnection directly to a local TCP
or UDP server.
> --
> This list falls under the WebRTC Code of Conduct - https://webrtc.org/support/code-of-conduct.
> ---
> You received this message because you are subscribed to a topic in the Google Groups "discuss-webrtc" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/discuss-webrtc/qXNh-oqPqPY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to discuss-webrt...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/discuss-webrtc/5ca51c6b-8992-42b2-8eb7-6801589b5123n%40googlegroups.com.

shakeeb nazmus

unread,
Jul 9, 2025, 10:39:32 AMJul 9
to discuss-webrtc
>>Basically, connect a local RTCPeerConnection directly to a local TCP
or UDP server.

Got it. This should work. This doesn't need RFC6062. Need to configure and install TURN server properly. 

Thanks,
Shakeeb. 

guest271314

unread,
Jul 9, 2025, 10:43:16 AMJul 9
to discuss...@googlegroups.com
> Got it. This should work. This doesn't need RFC6062. Need to configure and install TURN server properly.

There's the rub.

I'm trying to use TCPServerSocket in Chrome browser itself as the TURN
server. So the TURN server will be written in JavaScript or compiled
to WebAssembly.

What are the basic connection parameters?
> To view this discussion visit https://groups.google.com/d/msgid/discuss-webrtc/408a964e-08b6-4fd9-9a27-186636e1556dn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages