mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-06-06 00:37:24 +03:00
Add ForwardMark to global settings (#173)
This commit is contained in:
parent
100c4ee1f4
commit
a5fdb1ad1d
7 changed files with 30 additions and 4 deletions
|
@ -56,11 +56,17 @@ func BuildClientConfig(client model.Client, server model.Server, setting model.G
|
|||
peerPersistentKeepalive = fmt.Sprintf("PersistentKeepalive = %d\n", setting.PersistentKeepalive)
|
||||
}
|
||||
|
||||
forwardMark := ""
|
||||
if setting.ForwardMark != DefaultForwardMark {
|
||||
forwardMark = fmt.Sprintf("FwMark = %s\n", setting.ForwardMark)
|
||||
}
|
||||
|
||||
// build the config as string
|
||||
strConfig := "[Interface]\n" +
|
||||
clientAddress +
|
||||
clientPrivateKey +
|
||||
clientDNS +
|
||||
forwardMark +
|
||||
"\n[Peer]\n" +
|
||||
peerPublicKey +
|
||||
peerPresharedKey +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue