1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-vps.git synced 2025-03-09 15:50:00 +00:00
openmptcprouter-vps/glorytun-udp-run
Ycarus (Yannick Chabanois) f89e40f9d9 Update glorytun UDP
2020-11-23 15:42:15 +00:00

19 lines
332 B
Bash

#!/bin/sh
set -e
if [ ! -f "$1" ]; then
echo "usage: $(basename "$0") FILE"
exit 1
fi
. "$(readlink -f "$1")"
DEV="gt${HOST:+c}-udp-$(basename "$1")"
exec glorytun \
bind from addr $BIND port $BIND_PORT \
keyfile "$1".key \
${DEV:+dev "$DEV"} \
${HOST:+to addr "$HOST" port "$PORT"} \
${OPTIONS:+$OPTIONS}