mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-07-01 16:35:37 +03:00
fix private subnets bug
This commit is contained in:
parent
2b7a8d01c7
commit
a89fb34555
5 changed files with 52 additions and 15 deletions
|
@ -154,7 +154,7 @@
|
|||
value="0.0.0.0/0">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="client_private_subnets" class="control-label">Allowed IPs</label>
|
||||
<label for="client_private_subnets" class="control-label">Private Subnets</label>
|
||||
<input type="text" data-role="tagsinput" class="form-control" id="client_private_subnets">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
|
@ -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}}{{if .Client.PrivateSubnets}},{{end}}{{$first :=true}}{{range .Client.PrivateSubnets }}{{if $first}}{{$first = false}}{{else}},{{end}}{{.}}{{end}}
|
||||
AllowedIPs = {{$first :=true}}{{range .Client.AllocatedIPs }}{{if $first}}{{$first = false}}{{else}},{{end}}{{.}}{{end}}{{if eq .Client.HasPrivateSubnet true}},{{$first :=true}}{{range .Client.PrivateSubnets }}{{if $first}}{{$first = false}}{{else}},{{end}}{{.}}{{end}}{{end}}
|
||||
{{end}}{{end}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue