Add built-in TURN server.

This commit is contained in:
Juliusz Chroboczek
2021-01-18 20:24:52 +01:00
parent a15915e8fc
commit 5a7937b198
5 changed files with 322 additions and 84 deletions
+4
View File
@@ -14,6 +14,8 @@ import (
"time"
"github.com/pion/webrtc/v3"
"github.com/jech/galene/turnserver"
)
type Server struct {
@@ -101,6 +103,8 @@ func updateICEConfiguration() *configuration {
}
}
cf.ICEServers = append(cf.ICEServers, turnserver.ICEServers()...)
if ICERelayOnly {
cf.ICETransportPolicy = webrtc.ICETransportPolicyRelay
}