Add WIREGUARD_MTU configuration option for customizable MTU settings

This commit is contained in:
Eduardo Silva
2026-03-24 14:52:24 -03:00
parent 9f563b4891
commit 018cf1380e
7 changed files with 26 additions and 0 deletions

View File

@@ -73,6 +73,15 @@ if [ -n "${WIREGUARD_STATUS_CACHE_REFRESH_INTERVAL:-}" ]; then
esac
fi
if [ -n "${WIREGUARD_MTU:-}" ]; then
if [[ "${WIREGUARD_MTU}" =~ ^[0-9]+$ ]] && [ "${WIREGUARD_MTU}" -ge 1280 ] && [ "${WIREGUARD_MTU}" -le 9000 ]; then
echo "WIREGUARD_MTU = ${WIREGUARD_MTU}" >> /app/wireguard_webadmin/production_settings.py
else
echo "Error: Invalid WIREGUARD_MTU value: ${WIREGUARD_MTU}. Must be an integer between 1280 and 9000."
exit 1
fi
fi
if [[ "${DEV_MODE,,}" != "true" ]]; then
sed -i "/^ path('admin\/', admin.site.urls),/s/^ / # /" /app/wireguard_webadmin/urls.py
fi