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 {
 | 
						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…
	
		Reference in New Issue