diff --git a/cloudflared-tunnel.md b/cloudflared-tunnel.md new file mode 100644 index 0000000..e69de29 diff --git a/startup.sh b/startup.sh index 180ea0e..cee8e6b 100644 --- a/startup.sh +++ b/startup.sh @@ -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 +