mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[GH-ISSUE #6911] [Feature]: One sub for multiple emails #4581
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#4581
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 @X-Oracle on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6911
Is your feature request related to a problem?
Hi @MHSanaei,
I hope you’re well.
I had been using version 2.9.4 until recently, when I upgraded to the latest version, It seems that a feature was removed to support allowing a single user to have multiple inbounds.
However, I can no longer use a single subscription for multiple email addresses. This means I have to create multiple subscriptions, which makes them harder to maintain.
Describe the solution you'd like
I can think of two possible solutions:
groupfeature, which would better align with the new panel design.Alternatives you've considered
No response
Concrete use case
No response
Mockups, screenshots, or examples
No response
Which parts of the panel would this affect?
Subscription (share links / Clash / JSON), Frontend (UI / panel pages), Backend (API endpoints, login, settings)
Are you willing to help?
Before submitting
@github-actions[bot] commented on GitHub (Oct 23, 2026):
This is a deliberate change in the panel, not an accidental removal. Since the client model became first-class, the panel rejects a subId that already belongs to another client. On the subscription side, though, a shared subId is still allowed and still aggregates, so restoring option 1 needs only the panel-side checks relaxed. Whether to do that is a product decision for the maintainer.
What the code does today
internal/web/service/client_crud.go:212-221:client_crud.go:689-698("Duplicate subId:"). Bulk add and import have the same check (client_bulk.go:1351,client_bulk.go:1435,client_portable.go:190).88a36773, "feat(clients): enforce unique subId per client like email" (first shipped in v3.2.5). Its message says: "The old multi-inbound model duplicated a client across inbounds sharing one subId, so this check was dropped; the first-class multi-client model makes per-client subId uniqueness correct again. Existing duplicates are left untouched; only new/edited duplicates are blocked."TestClientUpdateDuplicateSubIDDoesNotRenameEmailininternal/web/service/client_update_rename_test.go:116.Your option 1: the storage layer already supports it
SubID string ... gorm:"index;column:sub_id"(internal/database/model/model.go:972). The code says so explicitly atinternal/web/service/client_lookup.go:107: "sub_id carries a plain index, not a unique one: one subscription can cover several clients".getInboundsBySubIdjoins onclients.sub_id = ?(internal/sub/service.go:680-691), andindexStatsBySubIdpulls all emails for that subId (service.go:710).TestClientUpdateKeepsSharedSubIDEditable(client_update_rename_test.go:148) checks that clients that already share a subId stay editable.Your option 2: groups have no subscription today
ClientGroup(internal/database/model/model.go:1010-1017) has onlyName,ResetUpandResetDown. There is no subId and no subscription route for a group, so this would be new work: a schema migration, sub-server routing and UI.What works right now
If one person needs several inbounds, the current model lets one client (one email, one subId) be attached to several inbounds at once. When you add or edit a client, select several inbounds; they are stored in
client_inbounds. Its single subscription then returns links for all those inbounds. This covers the old "same subId on several emails" setup, unless you need separate traffic counters or limits per email. If that's your case, please say so, because it changes which of your two options fits.Verdict: Feature request
This reply was generated automatically; a maintainer may follow up.
@X-Oracle commented on GitHub (Oct 23, 2026):
the use case is one person needs several emails for one inbound, each email routed through different outbound.
Person: Alex
Email1: US.Alex@Dir on inbound 1
Email2: DE.Alex@Dir on inbound 1
email3: US.Alex@CF on inbound 2
email4: DE.Alex@CF on inbound 2
subid: alex-sub
must be able to aggregate all of them