Leadaxe:LxBox 不应盲拷 Xray sessionID 字段,需遵守 1.1.47 合同

Leadaxe 说明 Xray 的 sessionIDLength/sessionIDTable 在真实配置中通常为空,且 sing-box 要求两字段成对出现;盲目复制会让原本可用的节点无法启动。合同与测试要求这些字段继续省略,若确有服务器需要应先提交带样例的 issue。

作者原文

Closing. This change reverses a deliberate contract decision without even reading it, and it breaks the test corpus.

Why this is wrong

  1. These fields were left out on purpose (contract 1.1.47, issue #131). Why we don't map them:
  • In real configs they are empty. Live vless+xhttp links and Xray JSON carry "sessionIDLength":"0","sessionIDTable":"". In Xray that means "not set, use the default". There is nothing to import.
  • The core treats them as a strict pair. sing-box requires session_length and session_table to be set together, and rejects the outbound with "must be set together" otherwise. A blind copy of the source values turns a node that works today into a node the core refuses to start: a config carrying only one of the two fields is rejected outright, and "0" with an empty table is not a real value to pass on.
  • No case that needs it. When both are absent, the core uses its default session id generation. Nobody has shown a server that fails with the default. Until there is one, mapping these fields carries only risk.

All of this is documented in app/contract/README.md (1.1.47) and app/contract/TASKS_LXBOX.md (§43). You didn't check.

  1. It breaks the corpus. body/xray/xhttp_extra_session_id_aliases and uri/vless/xhttp_extra_session_id_aliases assert exactly the opposite: both keys stay out of the body and produce json_field_unknown warnings. With this PR those cases fail. Obviously no tests were run.
  2. Hand-edited contract copy — again. app/contract/ and app/assets/contract/ are synced from the launcher. Your edit gets wiped on the next sync, and the Go side knows nothing about it. Contract norms change through the contract, not through a PR here.
  3. No value handling. "0" / "" must be treated as "not set", not copied into the body. Types aren't checked either: in Xray JSON sessionIDLength can be a number, while the body field is a string (range).
  4. Empty description, no issue, no spec, no example of a server that actually needs this, wrong branch (main instead of develop).

Don't send PRs like this. If you have a server that doesn't work without custom session id length/table, open an issue with a sample config (redacted is fine) and what fails. Then it can be considered as a contract change.