Closed RohanDoshi21 closed 5 months ago
Here's a snippet of code to use a TURN server over TLS in pion/webrtc:
// Set the ICE server config
config := webrtc.Configuration{
ICEServers: []webrtc.ICEServer{
{
URLs: []string{"turns:<TURN_SERVER_IP_ADDRESS>:<TURN_SERVER_PORT>?transport=tcp"},
Username: "<USERNAME>",
Credential: "<PASSWORD>",
},
},
}
// Create a new RTCPeerConnection
peerConnection, err := api.NewPeerConnection(config)
For the specification of the TURN URI format see the RFC here. Plus there are millions of examples on how to use pion/webrtc here.
The example mentioned in turn-server/tls let's me configure TLS enabled turn server.
I am using pion/webrtc, where I am providing it to the ICEServer, how can I enable TLS here ?