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
ff2e7cf6d1
commit
04fca16b4b
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 {
|
if client.UseServerDNS {
|
||||||
clientDNS = fmt.Sprintf("DNS = %s\n", strings.Join(setting.DNSServers, ","))
|
clientDNS = fmt.Sprintf("DNS = %s\n", strings.Join(setting.DNSServers, ","))
|
||||||
}
|
}
|
||||||
|
clientMTU := fmt.Sprintf("MTU = %d\n", setting.MTU)
|
||||||
|
|
||||||
// Peer section
|
// Peer section
|
||||||
peerPublicKey := fmt.Sprintf("PublicKey = %s\n", server.KeyPair.PublicKey)
|
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 +
|
clientAddress +
|
||||||
clientPrivateKey +
|
clientPrivateKey +
|
||||||
clientDNS +
|
clientDNS +
|
||||||
|
clientMTU +
|
||||||
forwardMark +
|
forwardMark +
|
||||||
"\n[Peer]\n" +
|
"\n[Peer]\n" +
|
||||||
peerPublicKey +
|
peerPublicKey +
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue