support multiple STUN servers
This commit is contained in:
@@ -15,8 +15,8 @@ type Config struct {
|
||||
MultiNode bool `yaml:"multi_node"`
|
||||
Development bool `yaml:"development"`
|
||||
|
||||
// Stun server
|
||||
StunServer string `yaml:"stun_server"`
|
||||
// STUN
|
||||
StunServers []string `yaml:"stun_servers"`
|
||||
}
|
||||
|
||||
func NewConfig(confString string) (*Config, error) {
|
||||
@@ -26,7 +26,9 @@ func NewConfig(confString string) (*Config, error) {
|
||||
RTCPort: 7881,
|
||||
UDPRangeStart: 10000,
|
||||
UDPRangeEnd: 11000,
|
||||
StunServer: "stun.l.google.com:19302",
|
||||
StunServers: []string{
|
||||
"stun.l.google.com:19302",
|
||||
},
|
||||
}
|
||||
if confString != "" {
|
||||
yaml.Unmarshal([]byte(confString), conf)
|
||||
|
||||
Reference in New Issue
Block a user