mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #4759] [Bug]: does not allow multiple clients to be assigned the same subscription ID after updating from version 3.2.0 to 3.2.5 #3299
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#3299
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 @Aitamij on GitHub (Jun 1, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4759
Describe the bug
after updating from version 3.2.0 to 3.2.5:
When editing an existing client and changing their subscription ID to an existing one, the dashboard display:
Something went wrong (Duplicate subId: qqxyd619p6gok03a )
Add Bulk feature does not work if you enter a Subscription ID:
1 created, 2 failed — subId already in use: dpg1nsgivxxisvz7
How to reproduce the problem
Expected behavior
No response
Actual behavior
No response
Relevant logs
Screenshots
No response
3x-ui version
3.2.5
Xray-core version
No response
How did you install 3x-ui?
Other (please describe in the bug body)
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 1, 2026):
Thanks for the detailed report. This is a real bug introduced in v3.2.5 when subscription ID uniqueness was enforced.
Root cause — Bulk Add
In
ClientBulkAddModal.tsx(line 154), thesubIdfrom the form is applied to every client in the batch:When you click the refresh button, a single random ID is generated and stored in
form.subId. Every client in the loop then gets that same value. Since v3.2.5 now rejects asubIdthat is already in use, only the first client is created and the rest fail.Workaround (until a fix is released)
Leave the Subscription ID field empty when using Bulk Add. The code falls back to
RandomUtil.randomLowerAndNum(16)— but because the expression is evaluated inside the.map(), each client receives its own freshly generated unique ID. The bug only triggers when you manually set (or refresh) the field before creating.Edit-client behaviour
The "Duplicate subId" error when editing a client is intentional — two different clients cannot share the same subscription ID in v3.2.5. If you were relying on shared subscription IDs across clients, that use-case is no longer supported.
Fix needed
The
payloads.map()in the bulk create path should always generate a freshsubIdper client regardless of what is in the form field, or the form field should be treated as a prefix rather than a literal value.@Aitamij commented on GitHub (Jun 1, 2026):
I have configured client-name-based routing rules on a server in my country. Based on the client’s name, the system selects the appropriate outbound server to send the request to one of the foreign servers using one of the protocols.
How can I now enable a single subscription to connect to different foreign servers?
I understand the protocols; I can configure them in both inbound and outbound routing, and a client with an inbound VLESS connection will send traffic to an outbound VLESS connection.
It used to work like this:
For a single subscribed user, three clients were loaded, for example:
client_FI_vless, client_FI_Hysteria, client_SE_vless
and thus, when connecting, for example, via client_FI_Hysteria,
the server in my country would receive requests via the Hysteria protocol and forward them to the server in Finland via the Hysteria protocol.
How can I implement similar logic now, since setting the same subscription is no longer supported?
@MHSanaei commented on GitHub (Jun 1, 2026):
Sub should be unique for each client
@rezakhosh78 commented on GitHub (Jun 1, 2026):
Hello dear Mr. Sanai, I have the same problem. Sometimes it is really necessary to use a common subscription id. If possible, in future versions like versions before 3.2.5, please provide this possibility.
When we use a node, we add several inbounds; sometimes it is necessary to have different traffic than the rest of the inbounds for a client. So either we need to use a different client name(email) with a sub-id or there is another way to specify for a user who uses a node and several inbounds whether the traffic of the inbounds he uses should be calculated together or separately and with different traffic.
@chuck852 commented on GitHub (Jun 1, 2026):
This change breaks an important routing/cascade use case.
Before v3.2.5 it was possible to have:
client-a / subId=user1 / same inbound :443 -> route by user=email to outboundTag A
client-b / subId=user1 / same inbound :443 -> route by user=email to outboundTag B
This allowed one subscription to contain multiple cascade options while keeping a single VLESS TCP RAW inbound on port 443.
The new recommended model "attach existing client to multiple inbounds" does not replace this use case, because routing can only distinguish these links by inboundTag, which requires separate inbounds. But for VLESS TCP RAW on port 443 it is not possible to create multiple equivalent inbounds on the same IP:port.
So this is not only a Duplicate subId validation issue. It is a regression for subscription-based cascade routing by user/email within the same inbound.
Expected:
Allow multiple clients to share one subId, or introduce another stable subscription grouping field separate from unique client identity.
@MHSanaei commented on GitHub (Jun 1, 2026):
not possible