mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-06-07 00:46:58 +03:00
Add the MTU to the generated client config to make sure both sides use the same MTU
This commit is contained in:
parent
efbc36d61f
commit
7fd2338278
1 changed files with 2 additions and 0 deletions
|
@ -28,6 +28,7 @@ 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 := fmt.Sprintf("MTU = %d\n", setting.MTU)
|
||||
|
||||
// Peer section
|
||||
peerPublicKey := fmt.Sprintf("PublicKey = %s\n", server.KeyPair.PublicKey)
|
||||
|
@ -66,6 +67,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