Add the MTU to the generated client config to make sure both sides use the same MTU

This commit is contained in:
Marcus Wichelmann 2022-08-04 13:08:41 +02:00
parent efbc36d61f
commit 7fd2338278
No known key found for this signature in database
GPG key ID: D9FC1B92E557C80D

View file

@ -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 +