Skip to content

Commit 908ee52

Browse files
committed
v0.4.2: remove DockerNAT from IP check #6
1 parent 4478a47 commit 908ee52

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

runx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#! /bin/bash
22
# runx: Provide an X server in Cygwin, MSYS2 or WSL.
33

4-
Version="v0.4.1"
4+
Version="v0.4.2"
55

66
usage() { # Usage information (--help)
77
echo "runx - Run Linux GUI applications on MS Windows.
@@ -326,10 +326,9 @@ check_host() { # Check host environment
326326

327327
# Get IP of Windows host
328328
[ "$Hostip" = "localhost" ] && Hostip="127.0.0.1"
329-
[ "$Hostip" ] || Hostip="$(ipconfig.exe | rmcr | grep -A6 'DockerNAT' | grep 'IPv4' | grep -o '[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*' | head -n1 )"
330-
[ "$Hostip" ] || Hostip="$(ipconfig.exe | rmcr | grep 'IPv4' | grep -o '192\.168\.[0-9]*\.[0-9]*' | head -n1 )"
331-
[ "$Hostip" ] || Hostip="$(ipconfig.exe | rmcr | grep 'IPv4' | grep -o '10\.0\.[0-9]*\.[0-9]*' | head -n1 )"
332-
[ "$Hostip" ] || Hostip="$(ipconfig.exe | rmcr | grep 'IPv4' | grep -o '[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*' | head -n1 )"
329+
[ "$Hostip" ] || Hostip="$(ipconfig.exe | rmcr | grep 'IPv4' | grep -o '192\.168\.[0-9]*\.[0-9]*' | head -n1 )"
330+
[ "$Hostip" ] || Hostip="$(ipconfig.exe | rmcr | grep 'IPv4' | grep -o '10\.0\.[0-9]*\.[0-9]*' | head -n1 )"
331+
[ "$Hostip" ] || Hostip="$(ipconfig.exe | rmcr | grep 'IPv4' | grep -o '[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*' | head -n1 )"
333332

334333
verbose "
335334
Subsystem: $Winsubsystem

0 commit comments

Comments
 (0)