add tunnel

This commit is contained in:
root
2022-04-04 13:36:06 +00:00
parent 3a780326f1
commit 4629bdd15a
2 changed files with 6 additions and 0 deletions

0
cloudflared-tunnel.md Normal file
View File

View File

@@ -49,4 +49,10 @@ cat << EOF > /etc/v2ray/config.json
EOF
# Run V2Ray
if [[ $TUNNEL_TOKEN ]]; then
echo 'has tunnel token, run cloudflared tunnel'
/usr/bin/v2ray -config /etc/v2ray/config.json & /root/cloudflared tunnel --no-autoupdate run --token $TUNNEL_TOKEN
else
/usr/bin/v2ray -config /etc/v2ray/config.json
fi