Files
compose/cloudflare-warp/build/entrypoint.sh
2025-08-10 10:09:24 +08:00

19 lines
474 B
Bash
Executable File

#!/usr/bin/env sh
nohup /usr/bin/warp-svc > /app/warp.log &
sleep 3
if [ -n "$WARP_TOKEN" ]; then
echo "Using WARP token from environment variable"
warp-cli --accept-tos connector new "$WARP_TOKEN"
warp-cli --accept-tos connect
else
echo "No WARP token provided, using default connector"
warp-cli --accept-tos registration new
warp-cli --accept-tos mode proxy
warp-cli --accept-tos connect
fi
gost -L=http://:1080 -F=socks5://127.0.0.1:40000