删除隧道:cloudflared tunnel delete 隧道名
列出隧道:cloudflared tunnel list
配置隧道:cloudflared tunnel route dns 隧道名 [CNAME 记录名称].[接入 CLoudflare 的域名]
运行隧道:cloudflared tunnel run --url http://127.0.0.1:http端口号 隧道名字
tunnel: [tunnel 的名称或 UUID] credentials-file: /root/.cloudflared/[tunnel 的 UUID].json ingress: - hostname: [CNAME 记录名称].[接入 CLoudflare 的域名] service: http://localhost:80 - service: http_status:404
配置文件使用 Ingress 规则,如果想配置 SSH、TCP 等其他协议,可以查看其官网
然后使用cloudflared tunnel --config [配置文件路径] run
运行隧道