mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-04-20 20:03:39 +03:00
Don't write disabled client to wireguard config file
This commit is contained in:
parent
233cf9b9b3
commit
d017ea17c8
1 changed files with 2 additions and 2 deletions
|
@ -9,7 +9,7 @@ ListenPort = {{ .serverConfig.Interface.ListenPort }}
|
|||
PrivateKey = {{ .serverConfig.KeyPair.PrivateKey }}
|
||||
MTU = {{ .globalSettings.MTU }}
|
||||
|
||||
{{range .clientDataList}}
|
||||
{{range .clientDataList}}{{if eq .Client.Enabled true}}
|
||||
# ID: {{ .Client.ID }}
|
||||
# Name: {{ .Client.Name }}
|
||||
# Email: {{ .Client.Email }}
|
||||
|
@ -18,4 +18,4 @@ MTU = {{ .globalSettings.MTU }}
|
|||
[Peer]
|
||||
PublicKey = {{ .Client.PublicKey }}
|
||||
AllowedIPs = {{$first :=true}}{{range .Client.AllocatedIPs }}{{if $first}}{{$first = false}}{{else}},{{end}}{{.}}{{end}}
|
||||
{{end}}
|
||||
{{end}}{{end}}
|
||||
|
|
Loading…
Add table
Reference in a new issue