Update mud and use argz_addr()

Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
This commit is contained in:
Adrien Gallouët
2018-02-15 19:04:05 +00:00
parent 40c6e3bc40
commit 7ba60a5b61
8 changed files with 98 additions and 80 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/sh
exec glorytun bind "$@" \
$BIND $BIND_PORT \
${DEV:+dev "$DEV"} \
${HOST:+to "$HOST" "$PORT"} \
${BIND_PORT:+port "$BIND_PORT"}
${HOST:+to "$HOST" "$PORT"}

View File

@@ -25,6 +25,11 @@ else
PORT=${PORT:-5000}
fi
BIND=0.0.0.0
case "$HOST" in
*:*) BIND=::
esac
_ask "Server key (enter to generate a new one)" KEY
if [ -z "$KEY" ]; then
KEY=$(glorytun keygen)
@@ -38,8 +43,9 @@ cat > "$DIR/env" <<EOF
DEV=gt${HOST:+c}-$NAME
HOST=$HOST
PORT=$PORT
BIND=$BIND
BIND_PORT=$BIND_PORT
OPTIONS=v4only mtu auto
OPTIONS="mtu auto"
EOF
( umask 077; echo "$KEY" > "$DIR/key" )