Skip to content

fix: xhttp 传输移除 XTLS Vision flow(与 HTTP/2 多路复用不兼容)#2

Merged
wangzhizhou merged 1 commit into
mainfrom
fix/xhttp-flow-incompatibility
Jun 18, 2026
Merged

fix: xhttp 传输移除 XTLS Vision flow(与 HTTP/2 多路复用不兼容)#2
wangzhizhou merged 1 commit into
mainfrom
fix/xhttp-flow-incompatibility

Conversation

@wangzhizhou

Copy link
Copy Markdown
Contributor

问题

xhttp 模式(已在上一个 PR #1 中移除了 fragment 冲突)仍然能连接但不能上网。

根因

flow: "xtls-rprx-vision" 是 XTLS Vision 流控,工作在 TLS Record 层来模仿浏览器流量。
xhttp 传输使用 HTTP/2 风格多路复用流管理自己的帧结构。两者同时存在时:

  • ✅ TCP 握手成功
  • ✅ Reality TLS 认证成功
  • ❌ xhttp 流帧被 Vision 流控干扰,数据传输失败

flow 字段在代码中无条件写入,未区分 tcp/xhttp。

修改

deploy.sh

  • xhttp 配置模板移除 "flow": "xtls-rprx-vision"(tcp 模板保留)
  • show_config xhttp URI 移除 &flow=xtls-rprx-vision
  • "流控"信息行仅 tcp 模式显示

export.sh

  • xhttp URI 移除 &flow=xtls-rprx-vision
  • xhttp Clash config 通过 jq 'del(.flow)' 移除 flow 字段

测试

  • 3 个 xhttp 配置测试各新增 flow // empty → 为空断言
  • xhttp metadata export 测试新增 URI 不含 flow= + Clash 不含 .flow 断言

.env.example

  • 默认启用 EASYNET_REALITY_TRANSPORT=xhttp

验证

  • ShellCheck: deploy.sh ✅ export.sh ✅
  • 配置生成测试: 9/9 ✅
  • 协议元数据 + 订阅测试: 56/56 ✅
  • 全量测试: 268/268 ✅

Root cause: flow: xtls-rprx-vision 工作在 TLS Record 层,
xhttp 使用 HTTP/2 流多路复用管理自身帧结构,两者冲突。
TLS/Reality 握手成功,但数据传输出错。

Changes:
- deploy.sh: xhttp 模板移除 flow 字段(tcp 保留)
- deploy.sh: show_config xhttp URI 移除 &flow=,"流控"行仅 tcp 显示
- export.sh: xhttp URI 移除 &flow=,Clash config 从 xhttp 中 del(.flow)
- tests: 3 个 xhttp 测试 + metadata export 追加 flow-absent 断言
- .env.example: 默认启用 EASYNET_REALITY_TRANSPORT=xhttp
@wangzhizhou wangzhizhou merged commit a1be37a into main Jun 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant