From 725edd59e08adc9783329693bf5dbe8005ac3ec5 Mon Sep 17 00:00:00 2001 From: imSp4rky Date: Wed, 8 Apr 2026 22:05:56 -0600 Subject: [PATCH] fix(gluetun): support WireGuard VPN ready detection WireGuard is stateless and never emits the OpenVPN-specific "initialization sequence completed" log line, causing the readiness check to always time out. Also accept "public ip address is" which gluetun logs once the WireGuard tunnel is up. Closes #99 --- unshackle/core/proxies/gluetun.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/unshackle/core/proxies/gluetun.py b/unshackle/core/proxies/gluetun.py index f9be0f3..a33c9c3 100644 --- a/unshackle/core/proxies/gluetun.py +++ b/unshackle/core/proxies/gluetun.py @@ -1052,7 +1052,7 @@ class Gluetun(Proxy): # Gluetun needs both proxy listening AND VPN connected # The proxy starts before VPN is ready, so we need to wait for VPN proxy_ready = "[http proxy] listening" in all_logs - vpn_ready = "initialization sequence completed" in all_logs + vpn_ready = "initialization sequence completed" in all_logs or "public ip address is" in all_logs if proxy_ready and vpn_ready: # Give a brief moment for the proxy to fully initialize @@ -1235,10 +1235,10 @@ class Gluetun(Proxy): duration_ms=duration_ms, ) raise RuntimeError( - f"Region mismatch for {container['provider']}:{container['region']}: " - f"Expected '{expected_code}' but got '{actual_country}' " - f"(IP: {ip_info.get('ip')}, City: {ip_info.get('city')})" - ) + f"Region mismatch for {container['provider']}:{container['region']}: " + f"Expected '{expected_code}' but got '{actual_country}' " + f"(IP: {ip_info.get('ip')}, City: {ip_info.get('city')})" + ) # Verification successful - store IP info in container record if query_key in self.active_containers: