mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-07-26 20:00:27 +03:00
add: client MTU settings available from command line
This commit is contained in:
parent
ad4ca4d9bb
commit
026bca5078
3 changed files with 11 additions and 1 deletions
|
@ -27,6 +27,10 @@ func BuildClientConfig(client model.Client, server model.Server, setting model.G
|
|||
if client.UseServerDNS {
|
||||
clientDNS = fmt.Sprintf("DNS = %s\n", strings.Join(setting.DNSServers, ","))
|
||||
}
|
||||
clientMTU := ""
|
||||
if ClientMTU > 0 {
|
||||
clientMTU = fmt.Sprintf("MTU = %d\n", ClientMTU)
|
||||
}
|
||||
|
||||
// Peer section
|
||||
peerPublicKey := fmt.Sprintf("PublicKey = %s\n", server.KeyPair.PublicKey)
|
||||
|
@ -60,6 +64,7 @@ func BuildClientConfig(client model.Client, server model.Server, setting model.G
|
|||
clientAddress +
|
||||
clientPrivateKey +
|
||||
clientDNS +
|
||||
clientMTU +
|
||||
"\n[Peer]\n" +
|
||||
peerPublicKey +
|
||||
peerPresharedKey +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue