From 0264ef9d977703bdc5ca40a64e905053b5408149 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 24 Nov 2025 08:50:17 +0100 Subject: [PATCH] Implement public IP check for VPN leak monitoring Added public IP fetching and logging for VPN services. --- .../etc/s6-overlay/s6-rc.d/svc-qbittorrent/run | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/qbittorrent/rootfs/etc/s6-overlay/s6-rc.d/svc-qbittorrent/run b/qbittorrent/rootfs/etc/s6-overlay/s6-rc.d/svc-qbittorrent/run index fe36ff5ad..306b5a4b2 100644 --- a/qbittorrent/rootfs/etc/s6-overlay/s6-rc.d/svc-qbittorrent/run +++ b/qbittorrent/rootfs/etc/s6-overlay/s6-rc.d/svc-qbittorrent/run @@ -230,9 +230,15 @@ _setup_wireguard() { # --- Main Execution --- +echo "$(_fetch_public_ip || true)" > /currentip + if bashio::config.true 'openvpn_enabled'; then # Start Leak Monitor - _vpn_monitor_public_ip "OpenVPN" & + if [[ -s /currentip ]]; then + bashio::log.warning "Could not fetch public ip, the vpn leakage service will not run" + else + _vpn_monitor_public_ip "OpenVPN" & + fi exec /usr/sbin/openvpn \ --config /config/openvpn/config.ovpn \ @@ -251,7 +257,11 @@ elif bashio::config.true 'wireguard_enabled'; then _setup_wireguard # Start Leak Monitor - _vpn_monitor_public_ip "WireGuard" & + if [[ -s /currentip ]]; then + bashio::log.warning "Could not fetch public ip, the vpn leakage service will not run" + else + _vpn_monitor_public_ip "WireGuard" & + fi fi