From 3064850f7c0b5cb9ca914c6fc21fb370be3bfa20 Mon Sep 17 00:00:00 2001 From: zarazaex69 Date: Thu, 30 Apr 2026 00:58:25 +0300 Subject: [PATCH] fix(telemost): exclude TURN/TURNS URLs from server hello config --- internal/provider/telemost/peer.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/provider/telemost/peer.go b/internal/provider/telemost/peer.go index 72a5820..0a2993b 100644 --- a/internal/provider/telemost/peer.go +++ b/internal/provider/telemost/peer.go @@ -698,12 +698,16 @@ func (p *Peer) applyServerHelloConfig(serverHello map[string]interface{}) { switch rawURLs := server["urls"].(type) { case []interface{}: for _, rawURL := range rawURLs { - if url, ok := rawURL.(string); ok && url != "" { + if url, ok := rawURL.(string); ok && url != "" && !strings.HasPrefix(url, "turn:") && !strings.HasPrefix(url, "turns:") { urls = append(urls, url) } } case []string: - urls = append(urls, rawURLs...) + for _, url := range rawURLs { + if !strings.HasPrefix(url, "turn:") && !strings.HasPrefix(url, "turns:") { + urls = append(urls, url) + } + } } if len(urls) == 0 {