diff --git a/config/config.go b/config/config.go index a612b92..a639796 100644 --- a/config/config.go +++ b/config/config.go @@ -3,7 +3,9 @@ package config import ( "fmt" "io" + "net" "os" + "time" yaml "gopkg.in/yaml.v2" ) @@ -98,16 +100,24 @@ type VolumeDef struct { } type MountDef struct { - Type string + Type string Dev string Path string Options string } type VPNDef struct { - Name string `yaml:"name"` - IPs []string - Config string + Name string `yaml:"name"` + ListenPort *int `yaml:"port"` + IPs []string + Peers []VPNPeer +} + +type VPNPeer struct { + PublicKey string `yaml:"public_key"` + Endpoint *net.UDPAddr + KeepAlive time.Duration `yaml:"keepalive"` + AllowedIPs []string `yaml:"allowed_ips"` } type GroupDef struct {