rego-tunnel: update for VM_NET_IP on 172.31.0.0/24 subnet
Some checks failed
Test / test (push) Has been cancelled
Some checks failed
Test / test (push) Has been cancelled
- Windows VM now uses 172.31.0.20 via VM_NET_IP env var - Updated get_windows_ip to look for 172.31.x.x - Fixed get_container_ip to exclude docker bridge gateway 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -19,8 +19,8 @@ get_windows_ip() {
|
|||||||
local ip=$(awk '/Windows/ {print $3}' /var/lib/misc/dnsmasq.leases 2>/dev/null | head -1)
|
local ip=$(awk '/Windows/ {print $3}' /var/lib/misc/dnsmasq.leases 2>/dev/null | head -1)
|
||||||
if [[ -n "$ip" ]]; then echo "$ip"; return; fi
|
if [[ -n "$ip" ]]; then echo "$ip"; return; fi
|
||||||
|
|
||||||
# Method 2: ip neigh (ARP table) - look for 172.30.x.x on docker interface
|
# Method 2: ip neigh (ARP table) - look for 172.31.x.x on docker interface (VM_NET_IP subnet)
|
||||||
ip=$(ip neigh show dev docker 2>/dev/null | grep -oE '172\.30\.[0-9]+\.[0-9]+' | head -1)
|
ip=$(ip neigh show dev docker 2>/dev/null | grep -oE '172\.31\.[0-9]+\.[0-9]+' | head -1)
|
||||||
if [[ -n "$ip" ]]; then echo "$ip"; return; fi
|
if [[ -n "$ip" ]]; then echo "$ip"; return; fi
|
||||||
|
|
||||||
# Method 3: qemu.ip file (if available)
|
# Method 3: qemu.ip file (if available)
|
||||||
@@ -28,8 +28,8 @@ get_windows_ip() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get_container_ip() {
|
get_container_ip() {
|
||||||
# Get container's external IP on 172.31.x.x subnet (vpn_static-rego)
|
# Get container's external IP (172.31.0.10) - exclude docker bridge gateway (.1)
|
||||||
ip -4 addr 2>/dev/null | grep -oE '172\.31\.[0-9]+\.[0-9]+' | head -1
|
ip -4 addr 2>/dev/null | grep -oE '172\.31\.0\.[0-9]+' | grep -v '\.1$' | head -1
|
||||||
}
|
}
|
||||||
|
|
||||||
(
|
(
|
||||||
|
|||||||
Reference in New Issue
Block a user