mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #4912] [MERGED] feat(sub): modern xray JSON format with unified finalmask editor #5746
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#5746
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?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/4912
Author: @biohazardous-man
Created: 6/4/2026
Status: ✅ Merged
Merged: 6/4/2026
Merged by: @MHSanaei
Base:
main← Head:main📝 Commits (4)
f4a0712feat(sub): add finalmask support to JSON subscriptions08fca9efeat(sub): modern xray JSON format with unified finalmask editord8e9d9bMerge branch 'main' into main665557bfix📊 Changes
27 files changed (+352 additions, -277 deletions)
View changed files
📝
frontend/public/openapi.json(+1 -1)📝
frontend/src/generated/types.ts(+2 -4)📝
frontend/src/generated/zod.ts(+2 -4)📝
frontend/src/lib/xray/forms/transport/FinalMaskForm.tsx(+15 -21)📝
frontend/src/models/setting.ts(+1 -2)➕
frontend/src/pages/settings/SubJsonFinalMaskForm.tsx(+55 -0)📝
frontend/src/pages/settings/SubscriptionFormatsTab.tsx(+9 -147)📝
frontend/src/schemas/setting.ts(+1 -2)📝
sub/sub.go(+6 -11)📝
sub/subController.go(+2 -3)📝
sub/subJsonService.go(+78 -70)➕
sub/subJsonService_test.go(+148 -0)📝
web/entity/entity.go(+1 -2)📝
web/service/setting.go(+5 -10)📝
web/translation/ar-EG.json(+2 -0)📝
web/translation/en-US.json(+2 -0)📝
web/translation/es-ES.json(+2 -0)📝
web/translation/fa-IR.json(+2 -0)📝
web/translation/id-ID.json(+2 -0)📝
web/translation/ja-JP.json(+2 -0)...and 7 more files
📄 Description
Summary
Add finalmask noise / fragment to 3x-ui JSON subscription endpoint.
Why
Right now only place where fragment or noise is displayed after setting it up in 3x-ui is outbound.
However, modern xray expects fragment and noise filters in the finalmask (see https://xtls.github.io/en/config/transports/finalmask.html#fragment)
Because of that modern clients don't see fragment/noise setting and can't apply it
Type of change
Areas affected
How was this tested?
Opened subscription JSON endpoint, now fragmentation is shown both in outbound and finalmask.
Ran unit test, it passed.
Breaking changes
If someone enables fragmentation it may need for clients to update their xray client version to more modern one.
Sadly if old version of Xray core finds fragment in finalmask, it just can't process this config. But since this is opt-in feature, I wouldn't consider that breaking change.
Checklist
go build ./...and the test suite pass locally.npm run lint,npm run typecheck, andnpm run buildpass.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.