mirror of
https://github.com/Ysurac/openmptcprouter-vps.git
synced 2025-03-09 15:50:00 +00:00
18 lines
284 B
Bash
18 lines
284 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 \
|
|
bin $BIND $BIND_PORT
|
|
${DEV:+dev "$DEV"} \
|
|
${HOST:+to "$HOST" "$PORT"} \
|
|
${OPTIONS:+$OPTIONS}
|