mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-05-23 00:15:19 +03:00
Add MTU to client configs (#214)
This commit is contained in:
parent
0a33ab35b6
commit
29b017f277
2 changed files with 7 additions and 2 deletions
|
@ -28,6 +28,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 setting.MTU > 0 {
|
||||
clientMTU = fmt.Sprintf("MTU = %d\n", setting.MTU)
|
||||
}
|
||||
|
||||
// Peer section
|
||||
peerPublicKey := fmt.Sprintf("PublicKey = %s\n", server.KeyPair.PublicKey)
|
||||
|
@ -66,6 +70,7 @@ func BuildClientConfig(client model.Client, server model.Server, setting model.G
|
|||
clientAddress +
|
||||
clientPrivateKey +
|
||||
clientDNS +
|
||||
clientMTU +
|
||||
forwardMark +
|
||||
"\n[Peer]\n" +
|
||||
peerPublicKey +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue