attempted fix at template to allow passing extra allowed subnets

This commit is contained in:
britt 2021-11-04 19:07:00 -04:00
parent 59abd1506f
commit 29541645bb

View file

@ -20,5 +20,5 @@ PostDown = {{ .serverConfig.Interface.PostDown }}
[Peer] [Peer]
PublicKey = {{ .Client.PublicKey }} PublicKey = {{ .Client.PublicKey }}
PresharedKey = {{ .Client.PresharedKey }} PresharedKey = {{ .Client.PresharedKey }}
AllowedIPs = {{$first :=true}}{{range .Client.AllocatedIPs }}{{if $first}}{{$first = false}}{{else}},{{end}}{{.}}{{end}} AllowedIPs = {{$first :=true}}{{range .Client.AllocatedIPs }}{{if $first}}{{$first = false}}{{else}},{{end}}{{.}}{{end}}{{$first :=true}}{{range .Client.AllowedIPs }}{{if ne . "0.0.0.0/0" }},{{.}}{{end}}{{end}}
{{end}}{{end}} {{end}}{{end}}