mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-03-26 07:51:43 +01:00
Compare commits
6 Commits
copilot/fi
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ee3b8d490 | ||
|
|
e2a1153082 | ||
|
|
4d49783d96 | ||
|
|
4312f9561c | ||
|
|
cdbf511aca | ||
|
|
8788fb2601 |
@@ -1,6 +1,5 @@
|
||||
## 5.1.4-19 (24-03-2026)
|
||||
- Fix OpenVPN not connecting: restore missing openvpn package in Dockerfile
|
||||
|
||||
- Minor bugs fixed
|
||||
## 5.1.4-18 (22-03-2026)
|
||||
- Minor bugs fixed
|
||||
## 5.1.4-17 (17-02-2026)
|
||||
|
||||
@@ -113,7 +113,7 @@ RUN chmod 744 /ha_automodules.sh && /ha_automodules.sh "$MODULES" && rm /ha_auto
|
||||
# && chmod a+x /etc/s6-overlay/s6-rc.d/$SCRIPTSNAME/* ; done; fi
|
||||
|
||||
# Manual apps
|
||||
ARG PACKAGES="openvpn ipcalc wireguard-tools libnatpmp iptables ip6tables"
|
||||
ARG PACKAGES="ipcalc wireguard-tools libnatpmp iptables ip6tables"
|
||||
|
||||
# Automatic apps & bashio
|
||||
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_autoapps.sh" "/ha_autoapps.sh"
|
||||
|
||||
@@ -347,8 +347,10 @@ _wireguard_up() {
|
||||
|
||||
# Add routing rules for VPN interface and DNS servers
|
||||
_routing_add || return 1
|
||||
# Add firewall rules for VPN interface
|
||||
_firewall_add || return 1
|
||||
# Add firewall rules for VPN interface (only when UPnP port mapping is enabled)
|
||||
if bashio::config.true 'vpn_upnp_enabled'; then
|
||||
_firewall_add || bashio::log.warning "Firewall rules could not be applied (non-fatal)."
|
||||
fi
|
||||
# Update resolv.conf with VPN DNS servers
|
||||
_resolvconf "update" || return 1
|
||||
# Wait for handshake to be established before returning success
|
||||
@@ -360,8 +362,10 @@ _wireguard_down() {
|
||||
_resolvconf "reset" || true
|
||||
# Remove routing rules for VPN interface and DNS servers
|
||||
_routing_del || true
|
||||
# Remove firewall rules for VPN interface
|
||||
_firewall_del || true
|
||||
# Remove firewall rules for VPN interface (only when UPnP port mapping is enabled)
|
||||
if bashio::config.true 'vpn_upnp_enabled'; then
|
||||
_firewall_del || true
|
||||
fi
|
||||
|
||||
_cmd "ip link set ${config["Interface"]} down" 2>/dev/null || true
|
||||
_cmd "ip link del ${config["Interface"]}" 2>/dev/null || true
|
||||
@@ -521,13 +525,17 @@ _openvpn_up() {
|
||||
_openvpn_down() {
|
||||
# Terminate OpenVPN process
|
||||
pkill -f "openvpn --config ${config["ConfigFile"]}" || true
|
||||
# Safety-net cleanup in case the --down callback was never invoked
|
||||
_routing_del || true
|
||||
}
|
||||
|
||||
_openpvn_postup() {
|
||||
# Add routing rules for VPN interface and DNS servers
|
||||
_routing_add || return 1
|
||||
# Add firewall rules for VPN interface
|
||||
_firewall_add || return 1
|
||||
# Add firewall rules for VPN interface (only when UPnP port mapping is enabled)
|
||||
if bashio::config.true 'vpn_upnp_enabled'; then
|
||||
_firewall_add || bashio::log.warning "Firewall rules could not be applied (non-fatal)."
|
||||
fi
|
||||
# Update resolv.conf with VPN DNS servers
|
||||
_resolvconf "update" || return 1
|
||||
}
|
||||
@@ -537,8 +545,10 @@ _openpvn_postdown() {
|
||||
_resolvconf "reset" || true
|
||||
# Remove routing rules for VPN interface and DNS servers
|
||||
_routing_del || true
|
||||
# Remove firewall rules for VPN interface
|
||||
_firewall_del || true
|
||||
# Remove firewall rules for VPN interface (only when UPnP port mapping is enabled)
|
||||
if bashio::config.true 'vpn_upnp_enabled'; then
|
||||
_firewall_del || true
|
||||
fi
|
||||
}
|
||||
|
||||
openvpn() {
|
||||
|
||||
Reference in New Issue
Block a user