Browse Source

Chore: adjust entrypoint.sh

pull/133/head
xjasonlyu 3 years ago
parent
commit
b394b09790
  1. 20
      docker/entrypoint.sh

20
docker/entrypoint.sh

@ -47,7 +47,7 @@ config_route() {
done
}
main() {
run() {
create_tun
create_table
config_route
@ -58,27 +58,27 @@ main() {
fi
if [ -n "$MTU" ]; then
ARGS="-mtu $MTU"
ARGS="--mtu $MTU"
fi
if [ -n "$STATS" ]; then
ARGS="$ARGS -stats $STATS"
ARGS="$ARGS --stats $STATS"
fi
if [ -n "$TOKEN" ]; then
ARGS="$ARGS -token $TOKEN"
ARGS="$ARGS --token $TOKEN"
fi
if [ -n "$UDP_TIMEOUT" ]; then
ARGS="$ARGS -udp-timeout $UDP_TIMEOUT"
ARGS="$ARGS --udp-timeout $UDP_TIMEOUT"
fi
exec tun2socks \
-loglevel "$LOGLEVEL" \
-fwmark "$FWMARK" \
-device "$TUN" \
-proxy "$PROXY" \
--loglevel "$LOGLEVEL" \
--fwmark "$FWMARK" \
--device "$TUN" \
--proxy "$PROXY" \
$ARGS
}
main || exit 1
run || exit 1

Loading…
Cancel
Save