mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #5929] [MERGED] feat(sub): Add XHTTP session field compatibility in share links and subscriptions #6030
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#6030
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/5929
Author: @beehunt9r
Created: 7/13/2026
Status: ✅ Merged
Merged: 7/28/2026
Merged by: @MHSanaei
Base:
main← Head:main📝 Commits (2)
15b2cbf✨ Add sessionKey and sessionPlacement compatability for previous clientsc5fd3d0✨ Add sessionKey and sessionPlacement compatability for previous clients on backend📊 Changes
4 files changed (+119 additions, -2 deletions)
View changed files
📝
frontend/src/lib/xray/inbound-link.ts(+10 -2)📝
frontend/src/test/inbound-link.test.ts(+70 -0)📝
internal/sub/service.go(+9 -0)📝
internal/sub/service_test.go(+30 -0)📄 Description
Summary
Adds backward-compatible XHTTP session field aliases to generated share links and subscription links. XHTTP
extranow carries bothsessionIDPlacement/sessionIDKeyandlegacy
sessionPlacement/sessionKey, while saved inbound configs keep only the canonicalsessionID*fields.Why
Recent Xray versions renamed
sessionPlacementandsessionKeytosessionIDPlacementandsessionIDKey. Older clients still expect the legacy names in XHTTPextra, sosubscription/share links could lose compatibility even though the inbound config itself is valid.
Type of change
Areas affected
How was this tested?
Ran targeted backend and frontend tests:
Added coverage for generated VLESS XHTTP subscription links to ensure the extra JSON contains both canonical and legacy session field names. Existing tests also confirm inbound
wire payloads and Xray runtime config do not emit duplicate legacy keys.
Screenshots / recordings
N/A
Breaking changes
None
Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.