check config contains external IPv6/IPv4
This commit is contained in:
parent
965fc367ac
commit
608dbf176f
@ -74,6 +74,10 @@ func MustLoadDsnetConfig() *DsnetConfig {
|
||||
err = validator.New().Struct(conf)
|
||||
check(err)
|
||||
|
||||
if len(conf.ExternalIP) == 0 && len(conf.ExternalIP6) == 0 {
|
||||
ExitFail("Config does not contain ExternalIP or ExternalIP6")
|
||||
}
|
||||
|
||||
return &conf
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user