Add wireguard MTU option

+ fix OpenVPN suffix to both conf and ovn
This commit is contained in:
litinoveweedle
2026-01-26 20:24:29 +01:00
parent af403e5eae
commit b001f1ebca
2 changed files with 6 additions and 1 deletions

View File

@@ -130,7 +130,7 @@ schema:
localdisks: str?
networkdisks: str?
openvpn_alt_mode: bool?
openvpn_config: match(^\w+\.ovpn$)?
openvpn_config: match(^\w+\.(ovpn|conf)$)?
openvpn_enabled: bool?
openvpn_password: str?
openvpn_username: str?

View File

@@ -220,6 +220,11 @@ _wireguard_up() {
else
_cmd "wg set ${config["Interface"]} peer ${config["PublicKey"]} endpoint ${config["EndpointIP"]}:${config["EndpointPort"]} allowed-ips ${allowed_ips}" || return 1
fi
if [ -v config["MTU"] ] && [ -n "${config["MTU"]}" ]; then
_cmd "ip link set ${config["Interface"]} mtu ${config["MTU"]}" || return 1
fi
_cmd "ip link set ${config["Interface"]} up" || return 1
_routing_add
}