Repository navigation
fix(finalmask): support stable fragment schema - #864
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughFinalMask serialization now emits singular and plural fragment fields. Backend host and subscription paths use the shared serializer. Dashboard compiled configurations normalize FinalMask settings for inbound and outbound entries. ChangesFinalMask compatibility
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: Merge Risk: ⚪ Minimal · up to FinalMask configurations now include stable-core singular fragment fields alongside newer plural fields without changing multi-range values, allowing generated configurations to work across supported Xray-core schemas. No current merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit packs fields in a neat little row Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
92b4767 to
7cc4a2d
Compare
Resolve tests/test_subscription_xray_finalmask.py: keep this PR's stable fragment schema test and the udphop and exp noise tests that PasarGuard#974 added at the same spot, with both import sets.
…ain bba95f274 Checked with git ls-remote on 2026-10-11 02:55 UTC. Panel dev moved from d94e157 to 83fe90e with 22 commits; main is still v5.4.1. - PasarGuard#879 (2d0ca81, loopback Xray client inbounds) is ported by design: the fork took the open pull request on 2026-09-25 as 2e7fc45 with migration bfd88026565b, the same listener rewrite. - PasarGuard#934 (a5b28f3) moves from the port queue to a dated waiver until 2026-11-09: the fork refuses to delete a core that nodes still use (W3-013, fix/node-health) instead of restarting those nodes. - PasarGuard#993 (Hysteria2 FinalMask without a udp mask) is queued until 2026-10-18: the fork has the same FinalMask | dict field and the same non-null-safe udpHop reads, so a udpHop-only host can fail the whole subscription. - PasarGuard#984, PasarGuard#985, PasarGuard#986, PasarGuard#989, PasarGuard#944, PasarGuard#864, PasarGuard#948, PasarGuard#951, PasarGuard#778, PasarGuard#774, PasarGuard#787, PasarGuard#994, PasarGuard#865, PasarGuard#875, PasarGuard#718, PasarGuard#967, PasarGuard#772, PasarGuard#662, PasarGuard#995 and PasarGuard#913 are queued as security: no until 2026-10-25, each with its reason; PasarGuard#913's node-removal half is already in the fork through sync_remove_users. - The branch commits that upstream squash-merged (the three dashboard branches, telegram/tests, fix/core-editor-api-section-followup, fix/hwid-count-test-cleanup, fix/hysteria-finalmask-quic-only) follow their squash, by patch-id or by an equal tree. Scripts main moved to bba95f274 (PasarGuard#35, PasarGuard#36, PasarGuard#37 after PasarGuard#34). The three squashes are queued security: no until 2026-10-25, and their pre-squash branch commits are waived as superseded (equal trees). Against live upstream the panel gate now fails only on the 17 port-queue commits classified security: yes, and the forks gate only on node f72ac0ef (security: yes). No upstream commit is undecided.
* fix(finalmask): support stable fragment schema * test: remove added PR tests --------- Co-authored-by: T3ST3ST3R0N <[email protected]> (cherry picked from commit 5a63605) Conflict resolution. The fork had its own emission step, to_xray_finalmask (b0bafaf, 4edae15), which popped the lengths/delays lists from every tcp and udp layer and wrote the span they cover as the scalar, overwriting a scalar that was already set. Upstream keeps the lists and adds the scalar length/delay from the first entry when the scalar is absent, for tcp fragment layers only. The node's shipped Xray v26.3.27 reads only the scalar and ignores the lists; Xray v26.10.21 and later apply the lists per segment. The upstream form is taken: dump_final_mask_for_xray has upstream's body, and to_xray_finalmask and _collapse_to_range are removed. The dashboard core-editor hunk, which already emits the upstream form for the node config, applies unchanged, so the link, the xray subscription and the core config now agree. Kept from the fork: the prune_blank_values step and the suppress() form in _stream_setting_config, the OpenVPNHostOverrides/ProxyHost/DB_RELOAD_ATTEMPTS imports in app/core/hosts.py. Not taken: upstream's docstring and inline comment in the helper (fork rule: no explanatory comments), and the upstream test context in tests/test_subscription_xray_finalmask.py that belongs to unported 7f670cf. The two upstream tests are taken as written. tests/test_finalmask_blank.py used to_xray_finalmask and pinned the span; it now goes through dump_final_mask_for_xray and pins the first-entry scalar next to the unchanged lists.
…r10/train-q SHAs, and the 1bf4af3 row says profileToPersistedConfig ends as upstream's now that PasarGuard#864 is carried
…ith MySQL evidence) # Conflicts: # UPSTREAM_SYNC.md
Summary
length/delay) and plural (lengths/delays) FinalMask fragment fieldsValidation
python -m pytest -q tests/test_finalmask_compatibility.py tests/test_subscription_clash_hysteria.py tests/test_subscription_clash_xhttp.py(15 passed)python -m pytest -q tests --ignore=tests/api --ignore=tests/test_review_admins_unit.py(173 passed, 2 skipped)python -m ruff check ...npm exec -- tsc --noEmitnpm run buildFixes #845
Summary by CodeRabbit