Leadaxe:LxBox 持久保存源格式,修复 Xray 节点保存与多出站丢失

Leadaxe 说明 LxBox 的 task 722 将 origin.kind 从笼统的 json 改为 singbox、xray 等明确格式,由 registry 在入口确定,保存时按格式改 tag 并经 checkConfig 校验;Xray 文档保留全部出站,dialerProxy 链接产生独立中继节点,routing、dns 等非节点内容仍会提示后丢弃。启动器共享合同升至 1.1.165,旧 json 记录首次读取时迁移;#203 不会合并。

作者原文

Confirmed, and the root cause is deeper than the type check in one place.

The source kind of a node record (sing-box vs Xray) was never stored. origin.kind only had uri | wg_ini | json, so every consumer re-detected the dialect from the text, and the Source-tab Save did it its own way — by looking for a sing-box type key. Xray outbounds have protocol, so the save path rejected them as "no node".

Fix is task 722:

  • origin.kind now stores the dialect: singbox | xray | uri | wg_ini. It is determined once by the source-kind registry when text enters the app (paste, import, Source-tab Save, subscription refresh) and never re-guessed from stored text.
  • Save on the Source tab works by that kind: the tag from the Tag field goes into the node body per dialect, the result goes through checkConfig like sing-box nodes do, and pasting a different dialect switches the record's kind instead of being rejected.
  • An Xray source is stored whole in its own dialect. A document with several outbounds is not cut to the first one: the record yields all its nodes, and dialerProxy links become separate relay nodes, same as for subscriptions.
  • Anything other than the node arrays (routing, dns, etc.) is dropped on save, as before, with one message.

The shared contract with the launcher is updated to 1.1.165 for this. Old records with json are migrated on first read.

#203 won't be merged — it patches the symptom in the screen, and the rest of the pipeline would still be guessing. Thanks for the report.