feat: support UDP in TURN (#61)

1. Add UDP option to TURN
2. GetLocalIPAddress default to IPv4
This commit is contained in:
hn8
2021-07-19 09:21:59 -07:00
committed by GitHub
parent c493022f0f
commit 06c44ca8f6
6 changed files with 83 additions and 42 deletions
+2
View File
@@ -91,6 +91,7 @@ type TURNConfig struct {
CertFile string `yaml:"cert_file"`
KeyFile string `yaml:"key_file"`
TLSPort int `yaml:"tls_port"`
UDPPort int `yaml:"udp_port"`
}
func NewConfig(confString string, c *cli.Context) (*Config, error) {
@@ -135,6 +136,7 @@ func NewConfig(confString string, c *cli.Context) (*Config, error) {
TURN: TURNConfig{
Enabled: false,
TLSPort: 3478,
UDPPort: 3478,
},
Keys: map[string]string{},
}