S-UI|科学之家 kexuezj.com
S-UI · 科学之家
alireza0X-UI 与 S-UI 核心维护者
GitHub·2026.09.13 01:16:37(UTC+8)

alireza0:s-ui JSON 订阅模板是面板参数对象,非 sing-box 配置

alireza0 说明 JSON 订阅模板用于面板组装配置,故 rules/rule_set/final 等位于顶层;表单按扁平结构工作,不打算同时接受嵌套 route 以免不一致,校验仍交给 sing-box check。详见原文。

作者原文@alireza0

Thanks for the detailed repro and for confirming the workaround.

The JSON subscription template isn't a sing-box config — it's a settings object the panel uses to build one. That's why the routing keys (rules, rule_set, final, default_domain_resolver) go at the top level: the panel assembles the route section itself. The form in the panel is the intended way to edit it, and it works with that flat structure, so accepting a nested route as well would put the form and the saved template out of sync.

For validation: sing-box check already verifies this correctly and always matches your sing-box version, so I'd rather not ship a second, weaker check in the panel.

The documentation gap is real though — I'll document the expected template structure and the supported keys.

Your workaround is the supported form, so nothing more is needed on your side. Thanks again for the clear report.