mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5189] [Bug]: Subscription JSON output doesn't contain the client UUID #3642
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#3642
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 @ArshiaDadras on GitHub (Jun 10, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5189
Describe the bug
By default, the format of the vless outbounds is like this:
But in the new version, the output of the subscription (JSON only) is like below:
The
vnextobject has been accidentally removed from the returned object, resulting in clients being unable to connect to the server with their JSON subscription...How to reproduce the problem
Expected behavior
No response
Actual behavior
No response
Relevant logs
Screenshots
No response
3x-ui version
3.3.0
Xray-core version
No response
How did you install 3x-ui?
install.sh script
Operating system
Ubuntu 24.04
Which parts of the panel are affected?
Subscription (share links / Clash / JSON)
Browser (only if it is a UI bug)
No response
Is the panel behind a reverse proxy or CDN?
None
Before submitting
@github-actions[bot] commented on GitHub (Jun 10, 2026):
Thanks for the detailed report. I've traced this to its source.
Root cause
PR #4912 (merged 2026-06-04, shipped in v3.3.0) deliberately changed the JSON subscription format. The stated goal was to support the modern xray
finalmask/fragment API. As a side-effect, the generator was changed to emit a flat outbound settings object for every protocol:settings.vnext[].users[].idsettings.id(flat)settings.vnext[].users[].idsettings.id(flat)settings.servers[].passwordsettings.password(flat)The relevant code is in
internal/sub/json_service.goatgenVless()(line 323) andgenVnext()(line 297). The unit tests ininternal/sub/json_service_test.go(TestSubJsonServiceVlessFlattened,TestSubJsonServiceVmessFlattened,TestSubJsonServiceServerFlattened) explicitly assert this flat shape is correct and thatvnext/serversare not present.The PR commit note reads:
What this means in practice
The flat format is intended for recent xray-core builds (the project now tracks a 2026 xray-core, see
go.mod). Clients that parse the JSON subscription as a standard xray outbound config — including the version of Streisand you're using — expect the traditional nestedvnext/usersstructure and will reject the flat shape.Workarounds while this is unresolved
Standard (URI) subscription — Use
/sub/<subid>instead of/json/<subid>. This generates plainvless://…/vmess://…/trojan://…URIs which all clients understand. Streisand supports this format (the subscription page's Streisand deeplink already points there).Import a hand-edited config — Take the JSON output, wrap the flat settings back into the
vnext/usersstructure manually, and paste it directly into the client.What needs to change
The flat format needs to be validated against the xray-core version bundled with this panel. If the flat format is not actually parseable by any released xray binary,
genVlessandgenVnextshould be reverted to usevnext[{address, port, users:[{id, encryption, flow}]}]andgenServerto useservers[{address, port, password}]. A PR restoring the nested structure would fix all affected clients.