make networks required for peer

This commit is contained in:
Callan Bryant 2020-03-04 19:46:39 +00:00
parent 4bb17e043f
commit d81bd72a5f
No known key found for this signature in database
GPG Key ID: C31FA9DF3ACBFFAA
2 changed files with 2 additions and 1 deletions

1
add.go
View File

@ -29,6 +29,7 @@ func Add() {
PrivateKey: privateKey, // omitted from server config JSON!
PresharedKey: GenerateJSONKey(),
IP: IP,
Networks: []JSONIPNet{},
}
conf.MustAddPeer(peer)

View File

@ -25,7 +25,7 @@ type PeerConfig struct {
// TODO ExternalIP support (Endpoint)
//ExternalIP net.UDPAddr `validate:"required,udp4_addr"`
// TODO support routing additional networks (AllowedIPs)
Networks []JSONIPNet
Networks []JSONIPNet `validate:"required"`
}
type DsnetConfig struct {