mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-02-05 19:34:52 +01:00
Add wireguard MTU option
+ fix OpenVPN suffix to both conf and ovn
This commit is contained in:
@@ -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?
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user