automatic configuration of TURN, with per-room credentials. version 0.6.0

This commit is contained in:
David Zhao
2021-03-07 23:30:21 -08:00
parent 048cdf9751
commit e20c831c14
18 changed files with 220 additions and 79 deletions
+5 -3
View File
@@ -52,7 +52,8 @@ type RedisConfig struct {
type TURNConfig struct {
Enabled bool `yaml:"enabled"`
ListenPort int `yaml:"listen_port"`
TCPPort int `yaml:"tcp_port"`
UDPPort int `yaml:"udp_port"`
PortRangeStart uint16 `yaml:"port_range_start"`
PortRangeEnd uint16 `yaml:"port_range_end"`
}
@@ -79,9 +80,10 @@ func NewConfig(confString string) (*Config, error) {
Redis: RedisConfig{},
TURN: TURNConfig{
Enabled: false,
ListenPort: 3478,
TCPPort: 3478,
UDPPort: 3478,
PortRangeStart: 12000,
PortRangeEnd: 16000,
PortRangeEnd: 14000,
},
Keys: map[string]string{},
}