Cloudflared tunnel 关闭QUIC 强制使用 http2 - 万事屋 - 技术宅银魂 - 科技改变生活 - 万事屋

Cloudflared tunnel 关闭QUIC 强制使用 http2

国内运营商好像都不支持QUIC,技术更新太慢真不是好事。偏偏Cloudflared tunnel 默认使用QUIC,导致国内经常报错,尤其是依赖 cloudflare tunnel 内网穿透的 api server,惨不忍睹,可用性连一半都不到。

官方没有解释怎么取消QUIC,还好有参与cloudflared tunnel 的开发者在github上做了解释:

图片[1] - Cloudflared tunnel 关闭QUIC 强制使用 http2 - 万事屋 - 技术宅银魂 - 科技改变生活 - 万事屋

挺简单,只要在启动cloudflare tunnel的命令上加一段“–protocol http2”,比如:

cloudflared tunnel run --protocol http2 tunnel-id

开机自动启动时,要在config.yml 加入这段(在json位置下方):

protocol: http2

保存,重启服务,OK~

Ubuntu利用Cloudflare Tunnel实现免费内网穿透的教程

    请登录后查看回复内容

万事屋新帖