Skip to content

proto!: drop SING_BOX and reserve BackendType 2 (feature 004) - #1

Merged
Free-Guy-IR merged 3 commits into
mainfrom
feat/004-remove-singbox
Dec 2, 2026
Merged

Free-Guy-IR merged 3 commits into
mainfrom
feat/004-remove-singbox

Conversation

@Free-Guy-IR

@Free-Guy-IR Free-Guy-IR commented Dec 1, 2026 •

Copy link
Copy Markdown
Owner

Feature 004, track A, bridge part: the proto follows the node, which drops the sing-box server core on the owner's order of 2026-12-01 (Free-Guy-IR/node#14).

commit what
35a3817 RED: the wire dialect test expects BackendType XRAY 0, WIREGUARD 1, OPEN_VPN 3 and L2TP 5, reserved ranges [(4, 4), (2, 2)] and names [MTPROTO, SING_BOX], and an older panel's type 2 decoding as the bare number
3e9e14c scripts/sync_proto.sh pins node ecfb6b29 (proto.lock); SING_BOX = 2 gone, reserved 2; and reserved "SING_BOX"; added; stubs regenerated with the locked grpcio-tools; README fork notes updated
de2c74e version 0.11.2+singbox.2 to 0.11.2+3

RED on beb8814: three dialect cases fail (Lists differ: [(4, 4)] != [(4, 4), (2, 2)], 2 unexpectedly found in [0, 1, 2, 3, 5]). They pass on this head, and scripts/check_proto_drift.sh reports the proto and every stub in sync with node ecfb6b29.

Version: the public part stays upstream's 0.11.2 and the local counter moves one step. The word singbox goes with the backend it named. By PEP 440 a numeric local segment sorts above a lettered one, so packaging.version reads 0.11.2+3 above 0.11.2+singbox.2; a new word such as 0.11.2+fork.3 would sort below it. 0.11.2+singbox.3 would also sort correctly if the owner prefers to keep the word. The panel's floor 0.9.2+singbox.3 is met either way.

Open point: upstream node_bridge_py gives BackendType 2 to MTPROTO from v0.9.5 (779f9b9, PasarGuard#26) to v0.11.2. With 2 reserved, the fork can only take that number later by dropping the reservation on purpose.

proto.lock pins a commit of the node branch; it stays valid when the node lands on main by fast-forward.

CI on de2c74e: Proto drift check 46753756720 (integrity ok) and the pull_request Tests run 46753756536 (all four jobs) are green. In the push Tests run 46753716842 the windows-latest 3.12 job failed once in test_lifecycle_lease_interleave.LeaseInterleaveTests.test_two_workers_never_both_renew_one_lease ("second worker acquired while the first still renewed"). This PR does not touch that test or the storage code it drives. The same commit passed that job in the pull_request run, and the log of the failure shows the event loop stalling (611 asyncio slow-callback warnings, 0.156 s at the start of that test) before the first worker reported "Lifecycle lease for LifecycleOperation.UPDATE_NODE was lost". A re-run of that job (attempt 2, job 143048359128) passed: Ran 326 tests in 962.234s, OK (skipped=44), with the lease test ok.

…d an older panel's 2 decodes as the bare number

The node drops the sing-box server core (feature 004, the owner's order
of 2026-12-01) and reserves BackendType 2 and the name SING_BOX in
common/service.proto. The bridge carries the same proto, so its wire
dialect test follows:

- the fork backend types are XRAY 0, WIREGUARD 1, OPEN_VPN 3 and L2TP 5;
- the reserved ranges are [(4, 4), (2, 2)] and the reserved names
  [MTPROTO, SING_BOX]; Name(2) and Value("SING_BOX") raise;
- a Backend carrying type 2 decodes as the bare number 2, which is no
  BackendType value.

RED on beb8814: 2 is still SING_BOX ("Lists differ: [(4, 4)] !=
[(4, 4), (2, 2)]", "2 unexpectedly found in [0, 1, 2, 3, 5]").
…endType 2 and its name reserved

scripts/sync_proto.sh pins Free-Guy-IR/node at ecfb6b29 (branch
feat/004-remove-singbox, feature 004): BackendType SING_BOX = 2 is gone
and "reserved 2;" and "reserved \"SING_BOX\";" stand beside the MTProto
reservation. The stubs are regenerated by make generate_grpc_code with
the locked grpcio-tools; service_grpc.py does not change, and
scripts/check_proto_drift.sh reports the proto and every stub in sync
with that commit. Proxy keeps every field, Hysteria2 (7) and TUIC (10)
included.

The README's fork notes stop listing sing-box among the backends and
SING_BOX among the accepted backend types, record 2 as reserved, and
date upstream's MTPROTO = 2 to bridge 0.9.5 (upstream 779f9b9, PasarGuard#26), the
first upstream tag whose proto carries it, not 0.10.0.

Upstream node_bridge_py gives 2 to MTPROTO from v0.9.5 to v0.11.2 (main);
the fork keeps 2 reserved instead, so an older fork panel that still
sends 2 for sing-box is never read as another backend.

The wire dialect tests of the previous commit pass.
The public part stays 0.11.2, upstream's release line; the fork's local
label moves one step, from 0.11.2+singbox.2 (5a1e106) to 0.11.2+3, for the
proto sync that drops SING_BOX (feature 004).

The word goes with the backend it named. The counter alone keeps the
order: by PEP 440 a numeric local segment sorts above a lettered one, so
packaging.version reads 0.11.2+3 > 0.11.2+singbox.2, while a new word
such as 0.11.2+fork.3 would sort below it. The panel's floor
0.9.2+singbox.3 is still met. uv lock changes only this package's
version line.
@Free-Guy-IR
Free-Guy-IR merged commit ab5f490 into main Dec 2, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant