Meta: Allow setting a host IP address to bind to

This commit is contained in:
Tim Schumacher 2022-04-19 14:39:57 +02:00 committed by Andreas Kling
parent 1878488c04
commit ec6016fa2c
Notes: sideshowbarker 2024-07-18 00:34:07 +09:00
2 changed files with 7 additions and 3 deletions

View file

@ -45,7 +45,7 @@ fi
if command -v wslpath >/dev/null; then
gdb_host=$(powershell.exe "(Test-Connection -ComputerName (hostname) -Count 1).IPV4Address.IPAddressToString" | tr -d '\r\n')
else
gdb_host=localhost
gdb_host=${SERENITY_HOST_IP:-127.0.0.1}
fi

View file

@ -219,8 +219,12 @@ else
fi
fi
if [ -z "$SERENITY_HOST_IP" ]; then
SERENITY_HOST_IP="127.0.0.1"
fi
if [ -z "$SERENITY_DISABLE_GDB_SOCKET" ]; then
SERENITY_EXTRA_QEMU_ARGS="$SERENITY_EXTRA_QEMU_ARGS -s"
SERENITY_EXTRA_QEMU_ARGS="$SERENITY_EXTRA_QEMU_ARGS -gdb tcp:${SERENITY_HOST_IP}:1234"
fi
if [ -z "$SERENITY_ETHERNET_DEVICE_TYPE" ]; then
@ -231,7 +235,7 @@ if [ "$SERENITY_ARCH" = "aarch64" ]; then
SERENITY_NETFLAGS=
SERENITY_NETFLAGS_WITH_DEFAULT_DEVICE=
else
SERENITY_NETFLAGS="-netdev user,id=breh,hostfwd=tcp:127.0.0.1:8888-10.0.2.15:8888,hostfwd=tcp:127.0.0.1:8823-10.0.2.15:23,hostfwd=tcp:127.0.0.1:8000-10.0.2.15:8000,hostfwd=tcp:127.0.0.1:2222-10.0.2.15:22"
SERENITY_NETFLAGS="-netdev user,id=breh,hostfwd=tcp:${SERENITY_HOST_IP}:8888-10.0.2.15:8888,hostfwd=tcp:${SERENITY_HOST_IP}:8823-10.0.2.15:23,hostfwd=tcp:${SERENITY_HOST_IP}:8000-10.0.2.15:8000,hostfwd=tcp:${SERENITY_HOST_IP}:2222-10.0.2.15:22"
SERENITY_NETFLAGS_WITH_DEFAULT_DEVICE="
$SERENITY_NETFLAGS
-device $SERENITY_ETHERNET_DEVICE_TYPE,netdev=breh