ext client MTU

This commit is contained in:
0xdcarns 2022-03-15 09:16:15 -04:00
parent 48a6847307
commit d25ca2d424

View file

@ -151,9 +151,15 @@ func getExtClientConf(w http.ResponseWriter, r *http.Request) {
if network.DefaultExtClientDNS != "" { if network.DefaultExtClientDNS != "" {
defaultDNS = "DNS = " + network.DefaultExtClientDNS defaultDNS = "DNS = " + network.DefaultExtClientDNS
} }
defaultMTU := 1420
if gwnode.MTU != 0 {
defaultMTU = int(gwnode.MTU)
}
config := fmt.Sprintf(`[Interface] config := fmt.Sprintf(`[Interface]
Address = %s Address = %s
PrivateKey = %s PrivateKey = %s
MTU = %d
%s %s
[Peer] [Peer]
@ -164,6 +170,7 @@ Endpoint = %s
`, client.Address+"/32", `, client.Address+"/32",
client.PrivateKey, client.PrivateKey,
defaultMTU,
defaultDNS, defaultDNS,
gwnode.PublicKey, gwnode.PublicKey,
newAllowedIPs, newAllowedIPs,