Make the TURN bind address configurable and allow for multiple addresses. (#4315)

This commit is contained in:
Omar Pakker
2026-03-30 14:46:10 +08:00
committed by GitHub
parent 4bc5e6bbef
commit e9b113c8f2
2 changed files with 91 additions and 88 deletions
+12 -10
View File
@@ -217,15 +217,16 @@ type LoggingConfig struct {
}
type TURNConfig struct {
Enabled bool `yaml:"enabled,omitempty"`
Domain string `yaml:"domain,omitempty"`
CertFile string `yaml:"cert_file,omitempty"`
KeyFile string `yaml:"key_file,omitempty"`
TLSPort int `yaml:"tls_port,omitempty"`
UDPPort int `yaml:"udp_port,omitempty"`
RelayPortRangeStart uint16 `yaml:"relay_range_start,omitempty"`
RelayPortRangeEnd uint16 `yaml:"relay_range_end,omitempty"`
ExternalTLS bool `yaml:"external_tls,omitempty"`
Enabled bool `yaml:"enabled,omitempty"`
Domain string `yaml:"domain,omitempty"`
CertFile string `yaml:"cert_file,omitempty"`
KeyFile string `yaml:"key_file,omitempty"`
TLSPort int `yaml:"tls_port,omitempty"`
UDPPort int `yaml:"udp_port,omitempty"`
RelayPortRangeStart uint16 `yaml:"relay_range_start,omitempty"`
RelayPortRangeEnd uint16 `yaml:"relay_range_end,omitempty"`
ExternalTLS bool `yaml:"external_tls,omitempty"`
BindAddresses []string `yaml:"bind_addresses,omitempty"`
}
type NodeSelectorConfig struct {
@@ -418,7 +419,8 @@ var DefaultConfig = Config{
PionLevel: "error",
},
TURN: TURNConfig{
Enabled: false,
Enabled: false,
BindAddresses: []string{"0.0.0.0"},
},
NodeSelector: NodeSelectorConfig{
Kind: "any",