moved stun server to configuration

This commit is contained in:
David Zhao
2020-10-08 00:03:27 -07:00
parent 6752c4a91d
commit 0a4ce6e742
2 changed files with 8 additions and 4 deletions
+4
View File
@@ -14,6 +14,9 @@ type Config struct {
// multi-node configuration,
MultiNode bool `yaml:"multi_node"`
Development bool `yaml:"development"`
// Stun server
StunServer string `yaml:"stun_server"`
}
func NewConfig(confString string) (*Config, error) {
@@ -23,6 +26,7 @@ func NewConfig(confString string) (*Config, error) {
RTCPort: 7881,
UDPRangeStart: 10000,
UDPRangeEnd: 11000,
StunServer: "stun.l.google.com:19302",
}
if confString != "" {
yaml.Unmarshal([]byte(confString), conf)