fix: xhttp 传输与 Fragment 分片不兼容 + 支持传输方式切换#1
Merged
Conversation
Root cause: fragmentSettings 是 TCP 层功能,与 xhttp (HTTP/3) 传输冲突。 同时启用时连接可建立但数据传输出错。 Changes: - deploy.sh: 提取 write_xray_config_template() 函数消除模板重复 - deploy.sh: fragment 注入仅对 tcp 生效(3 处守卫 + 日志判断) - deploy.sh: 已有配置路径检测 transport 变化并重新生成模板(保留 key) - tests: 新增 4 个测试覆盖 xhttp/fragment/切换场景 - .env.example: 修正示例配置(默认 TCP+Fragment,xhttp 为备选) - docs/deployment.md: 增加不兼容警告说明
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
xhttp (HTTP/3) 传输与 Fragment 包分片同时启用时,Reality 能连接但无法上网。
fragmentSettings是 TCP 层功能,与 xhttp 的 HTTP/2 流管理冲突。详见计划文件:
/Users/joker/.claude/plans/cozy-weaving-kernighan.md修改
deploy.sh
write_xray_config_template()函数消除模板代码重复测试
test_config_generation.bats: 新增 3 个测试 + 增强现有断言test_protocol_metadata.bats: 新增 xhttp export 测试文档
.env.example: 修正示例配置(默认 TCP+Fragment,xhttp 为备选)docs/deployment.md: 变量说明 + 不兼容警告验证