From 29541645bb037d328d081dccafc416db7def24c6 Mon Sep 17 00:00:00 2001 From: britt Date: Thu, 4 Nov 2021 19:07:00 -0400 Subject: [PATCH] attempted fix at template to allow passing extra allowed subnets --- templates/wg.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/wg.conf b/templates/wg.conf index f4b1981..af685cf 100644 --- a/templates/wg.conf +++ b/templates/wg.conf @@ -20,5 +20,5 @@ PostDown = {{ .serverConfig.Interface.PostDown }} [Peer] PublicKey = {{ .Client.PublicKey }} 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}}