mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #4979] [CLOSED] fix(clients): restore shared subId compatibility #5751
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#5751
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/4979
Author: @ergolyam
Created: 6/5/2026
Status: ❌ Closed
Base:
main← Head:sub-id-fix📝 Commits (1)
5ae23e1fix(clients): restore shared subId compatibility📊 Changes
2 files changed (+121 additions, -49 deletions)
View changed files
📝
web/service/client.go(+0 -49)➕
web/service/client_shared_subid_test.go(+121 -0)📄 Description
Summary
Restore compatibility for shared client subscription IDs by allowing multiple clients to use the same
subIdagain. Email uniqueness is still enforced;subIdis treated as a subscription grouping key.Why
Some existing deployments use one subscription ID to expose several client configs/transports under the same subscription URL. This used to work, and the subscription generator still supports it by returning every enabled client matching the requested
subId.The recent service-layer uniqueness checks blocked new or edited clients with an existing
subId, causingsubId already in use/Duplicate subIderrors even though the database schema does not enforcesub_iduniqueness.Refs #4759, #4927, #4953, #4785.
Type of change
Areas affected
How was this tested?
Added regression tests covering shared
subIdbehavior for:Commands run:
I also tried:
That command is blocked in this checkout because
web/web.goembedsweb/dist, which is not present:Screenshots / recordings
N/A.
Breaking changes
None. This restores the previous shared-subscription behavior and does not require a migration or API payload changes.
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.