mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-12 02:21:28 +02: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?
|
localdisks: str?
|
||||||
networkdisks: str?
|
networkdisks: str?
|
||||||
openvpn_alt_mode: bool?
|
openvpn_alt_mode: bool?
|
||||||
openvpn_config: match(^\w+\.ovpn$)?
|
openvpn_config: match(^\w+\.(ovpn|conf)$)?
|
||||||
openvpn_enabled: bool?
|
openvpn_enabled: bool?
|
||||||
openvpn_password: str?
|
openvpn_password: str?
|
||||||
openvpn_username: str?
|
openvpn_username: str?
|
||||||
|
|||||||
@@ -220,6 +220,11 @@ _wireguard_up() {
|
|||||||
else
|
else
|
||||||
_cmd "wg set ${config["Interface"]} peer ${config["PublicKey"]} endpoint ${config["EndpointIP"]}:${config["EndpointPort"]} allowed-ips ${allowed_ips}" || return 1
|
_cmd "wg set ${config["Interface"]} peer ${config["PublicKey"]} endpoint ${config["EndpointIP"]}:${config["EndpointPort"]} allowed-ips ${allowed_ips}" || return 1
|
||||||
fi
|
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
|
_cmd "ip link set ${config["Interface"]} up" || return 1
|
||||||
_routing_add
|
_routing_add
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user