Fix TURN server URL (#4389)

Addresses https://github.com/livekit/livekit/issues/4384
This commit is contained in:
Raja Subramanian
2026-03-24 15:52:05 +05:30
committed by GitHub
parent 9e0a7e545f
commit 59e9bb41b9

View File

@@ -1023,7 +1023,9 @@ func (r *RoomManager) iceServersForParticipant(apiKey string, participant types.
if r.config.TURN.UDPPort > 0 && !tlsOnly {
// UDP TURN is used as STUN
hasSTUN = true
urls = append(urls, fmt.Sprintf("turn:%s:%d?transport=udp", r.config.RTC.NodeIP, r.config.TURN.UDPPort))
for _, ip := range r.config.RTC.NodeIP.ToStringSlice() {
urls = append(urls, fmt.Sprintf("turn:%s:%d?transport=udp", ip, r.config.TURN.UDPPort))
}
}
if r.config.TURN.TLSPort > 0 {
urls = append(urls, fmt.Sprintf("turns:%s:443?transport=tcp", r.config.TURN.Domain))