Add ForwardMark to global settings (#173)

This commit is contained in:
fr123k
2022-04-24 09:44:33 +02:00
committed by GitHub
parent 100c4ee1f4
commit a5fdb1ad1d
7 changed files with 30 additions and 4 deletions

View File

@@ -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 +