From 0aadef47056483e36f94146275fec907a7830243 Mon Sep 17 00:00:00 2001 From: alexz Date: Fri, 19 Dec 2025 08:58:44 +0000 Subject: [PATCH] rego-tunnel: detect container IP by subnet instead of interface name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Interface order is not consistent. Search for 172.31.x.x subnet instead. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- apps/rego-tunnel/vpn_scripts/start.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/rego-tunnel/vpn_scripts/start.sh b/apps/rego-tunnel/vpn_scripts/start.sh index bdd1997..6ca5551 100755 --- a/apps/rego-tunnel/vpn_scripts/start.sh +++ b/apps/rego-tunnel/vpn_scripts/start.sh @@ -28,8 +28,8 @@ get_windows_ip() { } get_container_ip() { - # Get container's external IP (vpn_static-rego - eth0) - ip -4 addr show eth0 2>/dev/null | awk '/inet / {print $2}' | cut -d/ -f1 + # Get container's external IP on 172.31.x.x subnet (vpn_static-rego) + ip -4 addr 2>/dev/null | grep -oE '172\.31\.[0-9]+\.[0-9]+' | head -1 } (