mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5568] finalmask fragment subscription config generates invalid array fields "lengths"/"delays" instead of string fields "length"/"delay" #3887
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#3887
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @andyplop9 on GitHub (Jun 25, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5568
Originally posted by @andyplop9 in #5565
@github-actions[bot] commented on GitHub (Jun 25, 2026):
The
lengths/delaysarray format in the generated subscription config is intentional and correct for the xray-core version that ships with 3x-ui v3.4.0. The xray-core source you quoted predates the change that introduced these fields.What changed and why
xray-core PR XTLS/Xray-core#6334 — titled "Fragment finalmask: Add `lengths` and `delays`" — was merged on 2026-06-22. It replaced the single-range
length/delaystrings with per-segment arrays so each fragment segment can carry its own length and delay:The old singular
length/delaykeys remain as a backward-compatibility fallback inside xray-core itself, but they are no longer what the new API emits.3x-ui v3.4.0 adopted this format in commit
852b53db("feat(xray): add loopback sniffing and per-segment fragment masks — support per-segment lengths/delays arrays with legacy length/delay migration (xray-core #6334)"). The frontend also containsmigrateFragmentSettings()(confirmed infrontend/src/lib/xray/forms/transport/FinalMaskForm.tsx) to silently convert any oldlength/delaykeys to the new arrays when the form is opened.The subscription JSON service (
internal/sub/json_service.go) passes the storedfinalmaskdata through to the exported config without transformation, so whatever is saved in the panel is what the subscriber receives.The actual compatibility problem
The error reported in the related #5565 —
infra/conf: LengthMin cant be 0— is the symptom of this mismatch:lengths/delays. It silently ignores them.lengthis absent, xray-core falls back tolength = 0, which is rejected at config load time with "LengthMin cant be 0".This is not a bug in the generated config. It is a client-side version compatibility issue: the subscription requires the client to run xray-core >= v26.6.22 (the release that includes PR #6334).
Workaround until your client app ships an updated xray-core
In the panel, remove the fragment finalmask from the subscription settings entirely and configure the fragment mask directly in your client application using whatever format your client's xray-core version understands. The server itself is unaffected.
If you control the client and can update it, installing xray-core >= v26.6.22 on the client side will make the subscription work without any panel changes.
Information that would help if you believe something else is happening
This reply was generated automatically; a maintainer may follow up.