From 5e645ef9f5510e411eea38f4e065a065bec7f8af Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Tue, 15 Mar 2022 11:01:26 +0900 Subject: [PATCH] shared: set default mtu of 1280 --- shared/src/types.rs | 2 +- shared/src/wg.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/src/types.rs b/shared/src/types.rs index 661b158..1d9051d 100644 --- a/shared/src/types.rs +++ b/shared/src/types.rs @@ -471,7 +471,7 @@ pub struct NetworkOpts { pub backend: Backend, #[clap(long)] - /// Specify the desired MTU for your interface (default: 1420 for IPv4 and 1400 for IPv6). + /// Specify the desired MTU for your interface (default: 1280). pub mtu: Option, } diff --git a/shared/src/wg.rs b/shared/src/wg.rs index e937d2a..8429719 100644 --- a/shared/src/wg.rs +++ b/shared/src/wg.rs @@ -100,7 +100,7 @@ pub fn up( .set_private_key(wireguard_control::Key::from_base64(private_key).unwrap()) .apply(interface, network.backend)?; set_addr(interface, address)?; - set_up(interface, network.mtu.unwrap_or(1412))?; + set_up(interface, network.mtu.unwrap_or(1280))?; if !network.no_routing { add_route(interface, address)?; }