From ed762369f10756839db6bc113b56cc06c68535f5 Mon Sep 17 00:00:00 2001 From: Michelle Wang Date: Mon, 16 Nov 2026 11:37:57 -0500 Subject: [PATCH] make MTU configurable --- docker/vpn-client/entrypoint_functions.bash | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docker/vpn-client/entrypoint_functions.bash b/docker/vpn-client/entrypoint_functions.bash index 5849102..3cf9a3b 100644 --- a/docker/vpn-client/entrypoint_functions.bash +++ b/docker/vpn-client/entrypoint_functions.bash @@ -159,8 +159,17 @@ configure_wireguard() { exit 1 fi + # MTU for the wireguard interface + local mtu=${VPN_MTU:-1280} + if ! [[ "$mtu" =~ ^[0-9]+$ ]] + then + echo "CRITICAL: VPN_MTU='$mtu' is not a positive integer" + exit 1 + fi + # activate and set mtu - ip link set mtu 1420 up dev wg0 + echo "info: setting wireguard interface MTU to '$mtu'" + ip link set mtu "$mtu" up dev wg0 if [ "$?" -ne 0 ] then echo "CRITICAL: could not activate wireguard interface"