Add -tcp flag to client and server for forwarding TCP connections (VLESS, etc.) through the TURN tunnel instead of UDP packets (WireGuard). Stack: TCP → smux (mux) → KCP (reliability) → DTLS (encryption) → TURN New dependencies: xtaci/kcp-go/v5, xtaci/smux
12 lines
216 B
Bash
12 lines
216 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
CONNECT="${CONNECT_ADDR:?CONNECT_ADDR is required}"
|
|
|
|
TCP_FLAG=""
|
|
if [ "${TCP_MODE}" = "true" ]; then
|
|
TCP_FLAG="-tcp"
|
|
fi
|
|
|
|
exec ./vk-turn-proxy -listen 0.0.0.0:56000 -connect "$CONNECT" $TCP_FLAG
|