Chore: adjust entrypoint.sh

This commit is contained in:
xjasonlyu
2022-01-29 14:09:59 +08:00
parent 59f682dfab
commit b394b09790
+10 -10
View File
@@ -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