兼容 Shadowsocks simple-obfs 订阅插件别名#48
Merged
Merged
Conversation
This was referenced May 5, 2026
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.
背景
部分 Shadowsocks 订阅会使用
plugin: obfs或plugin: simple-obfs表达 simple-obfs 节点,并通过mode/host表达插件参数。但 sing-box 当前支持的 SIP003 插件名是
obfs-local,如果 Resin 直接把订阅里的obfs/simple-obfs透传到出站配置,会导致节点运行时报错:plugin not found: obfs改动
obfs->obfs-localsimple-obfs->obfs-localobfs-local保持为obfs-localmode/obfs->obfshost/obfs-host/obfs_host->obfs-hostplugin_opts中转义的分号和等号,避免误切分\;或\=。测试补充
本 PR 同步补充了订阅解析测试用例,覆盖 simple-obfs 别名、分离参数格式、Clash/SSD/Netch 导入,以及 SIP003 转义参数边界。现有
v2ray-plugin测试继续覆盖,确认非 simple-obfs 插件不会被误改写。验证
已执行:
关联问题
关联 #46。本次修复认为其中一类 Shadowsocks 节点熔断问题来自 simple-obfs 订阅格式兼容:订阅侧常见的
obfs/simple-obfs、mode/host没有转换成 sing-box 需要的obfs-local、obfs/obfs-host。其他 Shadowsocks 失败场景后续可以按具体节点格式和运行错误继续排查。