sub-store-org / sub-store-org/Sub-Store
[FR] Shadowrocket 输出从 mihomo YAML 兼容格式调整为 Shadowrocket 原生格式
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 1.4k
- Avg merge
- 5h 31m
- Merged PRs (30d)
- 10
Description
阅读确认
- 我已阅读上方排查方法
运行环境
Docker
影响范围
订阅转换
上述运行环境版本/App 版本
Docker 29.4.2
后端版本
2.22.20
前端版本
none
复现方式
- 准备包含 VLESS (Reality/WS) 或 Hysteria2 等新协议的订阅节点。
- 使用substore自带的转换操作,指定目标平台为 Shadowrocket 进行转换导出。
- 观察输出的 [Proxy] 区块内容。
期望表现
输出标准的 Shadowrocket INI 语法代码,例如:
🇺🇸 VLESS.US = vless, ww1.example.com, 443, password=uuid, tls=true, pbk=xxx, sid=xxx
实际表现
输出了 YAML 嵌套 JSON 的 Clash 格式:
proxies:
- {"type":"hysteria2","name":"🇺🇸 Hysteria2...","server":"ww1...","port":8443...}
- {"type":"vless","name":"🇺🇸 VLESS...","reality-opts":{"public-key":"..."}}
其他信息
目前这个输出格式会直接影响 All-in-One (AIO) 一键配置文件的制作。这里的 AIO 指的是把节点信息直接写进 .conf 文件里,用户下载配置文件时就能同时导入节点。
在 Shadowrocket 的 AIO 配置里,[Proxy] 区块只能使用前面提到的原生 INI 格式。虽然 Shadowrocket 作为节点订阅导入时兼容性很强,URI、Base64 都能识别,但在 .conf 配置文件里并不支持这些格式。如果这里的节点格式不对,配置文件下载下来后就加载不了节点。
因为这个问题还没解决,现在只能自己写 JS 脚本,用正则把字段提取出来再转换一遍。但新协议和新字段一直在增加,自己维护这种转换脚本很容易漏字段,也不太稳定。希望能修一下底层字段映射逻辑,让 Shadowrocket 可以直接导出可用的原生 INI 格式。
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the target-platform Shadowrocket conversion and the generated [Proxy] section, using the reported VLESS (Reality/WS) and Hysteria2 examples. Reproduce the Docker conversion and compare its output with the expected native Shadowrocket INI syntax; done means the generated AIO configuration contains usable native [Proxy] entries for these protocols.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100