mirror of
https://github.com/swissmakers/wireguard-manager.git
synced 2026-04-05 10:47:05 +02:00
Don't write disabled client to wireguard config file
This commit is contained in:
@@ -9,7 +9,7 @@ ListenPort = {{ .serverConfig.Interface.ListenPort }}
|
|||||||
PrivateKey = {{ .serverConfig.KeyPair.PrivateKey }}
|
PrivateKey = {{ .serverConfig.KeyPair.PrivateKey }}
|
||||||
MTU = {{ .globalSettings.MTU }}
|
MTU = {{ .globalSettings.MTU }}
|
||||||
|
|
||||||
{{range .clientDataList}}
|
{{range .clientDataList}}{{if eq .Client.Enabled true}}
|
||||||
# ID: {{ .Client.ID }}
|
# ID: {{ .Client.ID }}
|
||||||
# Name: {{ .Client.Name }}
|
# Name: {{ .Client.Name }}
|
||||||
# Email: {{ .Client.Email }}
|
# Email: {{ .Client.Email }}
|
||||||
@@ -18,4 +18,4 @@ MTU = {{ .globalSettings.MTU }}
|
|||||||
[Peer]
|
[Peer]
|
||||||
PublicKey = {{ .Client.PublicKey }}
|
PublicKey = {{ .Client.PublicKey }}
|
||||||
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}}
|
||||||
{{end}}
|
{{end}}{{end}}
|
||||||
|
|||||||
Reference in New Issue
Block a user