Feature(docker): add tcp options env

This commit is contained in:
xjasonlyu
2022-04-02 15:15:06 +08:00
parent a0d31261b9
commit 289ea82829
2 changed files with 15 additions and 0 deletions
+12
View File
@@ -69,6 +69,18 @@ run() {
ARGS="$ARGS --udp-timeout $UDP_TIMEOUT"
fi
if [ -n "$TCP_SNDBUF" ]; then
ARGS="$ARGS --tcp-sndbuf $TCP_SNDBUF"
fi
if [ -n "$TCP_RCVBUF" ]; then
ARGS="$ARGS --tcp-rcvbuf $TCP_RCVBUF"
fi
if [ "$TCP_AUTO_TUNING" -eq 1 ]; then
ARGS="$ARGS --tcp-auto-tuning"
fi
exec tun2socks \
--loglevel "$LOGLEVEL" \
--fwmark "$FWMARK" \