mirror of
https://github.com/ngoduykhanh/wireguard-ui
synced 2024-05-29 03:52:13 +02: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
|
@ -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…
Reference in a new issue