fix(protocol): 保留 SSR 协议与混淆参数#261
Merged
Merged
Conversation
补齐 Clash YAML、SSR 链接编解码及反向导出中的 protocol-param 和 obfs-param,避免 SSR 认证参数在机场导入后丢失。 验证:gofmt -l 无输出;golangci-lint run 通过;go test ./... 通过;MA 实际节点检测成功。
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.
描述
修复 Clash YAML 导入 SSR 节点时,
protocol-param和obfs-param被静默丢弃的问题。SublinkPro 原有
Proxy数据模型未接收这两个 SSR 专用字段,导致机场订阅虽然能够正常导入,但生成的 SSR 链接缺少认证参数。对于auth_aes128_md5等依赖protocol-param的节点,会进一步造成 Mihomo 延迟测试和实际连接失败。本次修改遵循最小化侵入原则,仅补齐 SSR 参数的数据模型、链接编解码和反向导出链路,不修改数据库结构、API、前端及其他协议实现。
关联 Issue
无关联 Issue。
更改类型
更改内容
Proxy数据模型补充protocol-param和obfs-param字段。protoparam、obfsparam的编码、解码和双向转换。截图
检查清单
我的代码遵循项目代码风格
后端检查已通过
前端改动已运行
yarn run lintUI 改动已检查 light/dark 和响应式状态
已按需补充或更新后端测试、注释和文档
行为或契约变化时,已检查跨层同步
本次更改不会引入安全漏洞
已运行命令或检查:
验证结果:
其他说明
obfs-param在plain混淆模式下通常为空;本次仍补齐该字段,以支持使用其他 SSR 混淆模式的订阅。