mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-05-03 22:02:23 +03:00
fix postup & postdown bug
This commit is contained in:
parent
a53a85618f
commit
f39ae22b27
1 changed files with 6 additions and 3 deletions
|
@ -36,11 +36,14 @@ func BuildClientConfig(client model.Client, server model.Server, setting model.G
|
|||
clientPrivateKey + "\n" +
|
||||
clientDNS + "\n\n"
|
||||
|
||||
if client.HasPrivateSubnet {
|
||||
if client.PostUp != "" {
|
||||
clientPostUp := fmt.Sprintf("PostUp = %s", client.PostUp)
|
||||
strConfig += clientPostUp + "\n"
|
||||
}
|
||||
|
||||
if client.PostDown != "" {
|
||||
clientPostDown := fmt.Sprintf("PostDown = %s", client.PostDown)
|
||||
strConfig += clientPostUp + "\n" +
|
||||
clientPostDown + "\n\n"
|
||||
strConfig += clientPostDown + "\n\n"
|
||||
}
|
||||
|
||||
strConfig += "[Peer]" + "\n" +
|
||||
|
|
Loading…
Add table
Reference in a new issue