feat: Mimic container IP

This commit is contained in:
Kroese 2025-10-07 05:50:00 +02:00 committed by GitHub
parent 85ee542fc5
commit 68943403fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -371,7 +371,14 @@ configureNAT() {
fi
fi
local ip="172.30.0.2"
local ip base
base=$(echo "$IP" | sed -r 's/([^.]*.){2}//')
if [[ "$IP" != "172.30."* ]]; then
ip="172.30.$base"
else
ip="172.31.$base"
fi
[ -n "$VM_NET_IP" ] && ip="$VM_NET_IP"
local gateway=""