You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tls_port config value ignored in embedded TURN ICE URL — hardcodes port 443 #4542
In pkg/service/roommanager.go, iceServersForParticipant checks TLSPort > 0 to decide whether to add a TURNS entry, but then ignores the configured value and hardcodes 443:
// pkg/service/roommanager.go ~line 1031ifr.config.TURN.TLSPort>0 {
urls=append(urls, fmt.Sprintf("turns:%s:443?transport=tcp", r.config.TURN.Domain))
// ^^^ should be %d + r.config.TURN.TLSPort
}
TLSPort is a documented, parsed config field (TLSPort int \yaml:"tls_port,omitempty"`inTURNConfig) — so configuring e.g. tls_port: 5349` correctly starts the TURN listener on 5349, but the ICE config advertised to browsers still says port 443.
To reproduce
Set turn.tls_port to any port other than 443 (e.g. 5349), enable the embedded TURN server, and connect a browser client. The ICE config in the JoinResponse will contain turns:your-domain:443?transport=tcp regardless of the configured value.
Impact
If port 443 on your infrastructure doesn't route to the TURN server (e.g. it terminates WebSocket/signaling, or is used for HTTPS), browsers fail to gather relay candidates. ICE falls back to direct/srflx paths only, and connections fail for users behind strict NAT.
Deploy a TLS-passthrough SNI proxy (e.g. nginx with ssl_preread) on port 443 that routes the configured turn.domain SNI to the actual TURN listener port.
Versions affected
Confirmed present in v1.10.1, v1.11.0, v1.12.0, and current main (cde89627). No existing issue found.
Yeah I understand, but what is this config var for then at all? It would still be possible to leave the default to 443 or explicitly set it to. It's a bit confusing for me, but if this is intended im fine with it ;-)
443 needs to be exposed to the outside because that's the only port allowed to send TLS traffic in many network setups (firewalls). Behind the load balancer, having tuen on a different port makes it easier to run the service as non privileged user and to share the node in non Kubernetes, or host networked deployment.
Activity
cnderrauber commentedon May 27, 2026
This is documented in
config-sample, which states that you should use a load balancer for this case. Your workaround is expected.simllll commentedon May 27, 2026
Okay, thanks for letting me know.
Curious if there is any specific reasoning for this behavior? What's the config value for then?
biglittlebigben commentedon May 27, 2026
TURN server behind a load balancer, which is a typical setup
simllll commentedon May 27, 2026
Yeah I understand, but what is this config var for then at all? It would still be possible to leave the default to 443 or explicitly set it to. It's a bit confusing for me, but if this is intended im fine with it ;-)
biglittlebigben commentedon May 27, 2026
443 needs to be exposed to the outside because that's the only port allowed to send TLS traffic in many network setups (firewalls). Behind the load balancer, having tuen on a different port makes it easier to run the service as non privileged user and to share the node in non Kubernetes, or host networked deployment.
simllll commentedon May 27, 2026
I see, makes sense. Thanks!
The config option only sets the listener port,but intentionally not the advertised port.