fixed run.sh for NAT traversal
This commit is contained in:
6
run.sh
6
run.sh
@@ -1,5 +1,5 @@
|
|||||||
# Starts server and runs it silently (i.e no output in the terminal)
|
# Starts server and runs it silently (i.e no output in the terminal)
|
||||||
./remotegameplay -tls -addr 0.0.0.0:${2} > /dev/null 2>&1 &
|
./remotegameplay -addr ${1} -port ${2} > /dev/null 2>&1 &
|
||||||
# Starts chromium browser and runs it silently (i.e no output in the terminal)
|
# Starts chromium browser and runs it silently (i.e no output in the terminal)
|
||||||
./remotegameplay -headless -addr ${1} -port ${2} > /dev/null 2>&1 &
|
./remotegameplay -headless -addr ${1} -port ${2} > /dev/null 2>&1 &
|
||||||
# Lets the script sleep for 2 seconds
|
# Lets the script sleep for 2 seconds
|
||||||
@@ -15,9 +15,9 @@ roomID=$(echo "$roomID" | tr -d '"')
|
|||||||
|
|
||||||
# Checks if the IP address is a IPV6 or IPV4 address
|
# Checks if the IP address is a IPV6 or IPV4 address
|
||||||
if [ "$1" != "${1#*[0-9].[0-9]}" ]; then
|
if [ "$1" != "${1#*[0-9].[0-9]}" ]; then
|
||||||
echo "https://"${1}":${2}/?roomID="${roomID}
|
echo "http://"${1}":${2}/?roomID="${roomID}
|
||||||
elif [ "$1" != "${1#*:[0-9a-fA-F]}" ]; then
|
elif [ "$1" != "${1#*:[0-9a-fA-F]}" ]; then
|
||||||
echo "https://["${1}"]:${2}/?roomID="${roomID}
|
echo "http://["${1}"]:${2}/?roomID="${roomID}
|
||||||
else
|
else
|
||||||
echo "Unrecognized IP format '$1'"
|
echo "Unrecognized IP format '$1'"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user