Files
vpnbot/scripts/start_wp.sh
T
2025-11-30 20:46:31 +04:00

21 lines
564 B
Bash
Executable File

cat /ssh/key.pub > /root/.ssh/authorized_keys
service ssh start
off=$(cat /config/pac.json | jq -r .warpoff)
key=$(cat /config/pac.json | jq -r .warp)
if [ "$off" = 'null' ]
then
warp-svc > /dev/null &
sleep 3
if [ ! -f /var/lib/cloudflare-warp/conf.json ]
then
warp-cli --accept-tos registration new
if [ ! -z "$key" ]
then
warp-cli --accept-tos registration license $key
fi
fi
warp-cli --accept-tos mode proxy
warp-cli --accept-tos connect
fi
socat TCP-LISTEN:4000,fork TCP:127.0.0.1:40000