[PR #5029] [CLOSED] Allow to use several clients in one subscription #5758

Closed
opened 2026-11-02 04:03:52 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/5029
Author: @Ponywka
Created: 6/6/2026
Status: ❌ Closed

Base: main ← Head: feature/multiclient-in-one-group


📝 Commits (1)

  • 2df950f fix(clients): disable enforcing unique subId per client like email

📊 Changes

1 file changed (+0 additions, -24 deletions)

View changed files

📝 web/service/client.go (+0 -24)

📄 Description

Summary

This change allows to use one SubID for different clients.
This reverts commit 88a3677318.

Why

I provide several URLs on one inbound to my friends to prevent connection collision when they are trying connect to my servers on a different devices. I don't know why but for reasons unknown to me, in rare cases where multiple connections are established from different devices, connection issues arise.

In addition, following the implementation of the node-based system, when migrating from v2.x to v3.x, different UUIDs are currently being used for the same clients across different servers, which makes it difficult to consolidate them all into a single subscription due to this rule.

Formally it should looks like:

Inbounds+Clients:

Node Email UUID SubID
SomeOfHost Fred (PC) 0f700c16-8c7c-4e0f-ae82-870cdbce2863 aljqd0mwtd6sfek7
AbstractServer Fred (PC) f668dcb2-7102-43a0-9228-b181bcb200c0 aljqd0mwtd6sfek7
SomeOfHost Fred (Smartphone) c8ca992b-e1e7-4c0c-8a8e-3a1c2f774c0f aljqd0mwtd6sfek7
AbstractServer Fred (Smartphone) 86e7b788-2782-412e-a22a-2c3275868767 aljqd0mwtd6sfek7
SomeOfHost Jack (PC) 2849f8e7-4619-4cd5-908b-ea3b12305a0f vjspmfh3noukdeiy
AbstractServer Jack (PC) ca581956-5d40-407c-a2e5-4c5f068e4b37 vjspmfh3noukdeiy
SomeOfHost Jack (Smartphone) 38e712af-d762-4b54-abd0-721037d0bea5 vjspmfh3noukdeiy
AbstractServer Jack (Smartphone) 036be987-edf0-4ac8-8f40-711d0ab40a2b vjspmfh3noukdeiy

Sub aljqd0mwtd6sfek7:

SomeOfHost - Fred (PC)
AbstractServer - Fred (PC)
SomeOfHost - Fred (Smartphone)
AbstractServer - Fred (Smartphone)

Sub vjspmfh3noukdeiy:

SomeOfHost - Jack (PC)
AbstractServer - Jack (PC)
SomeOfHost - Jack (Smartphone)
AbstractServer - Jack (Smartphone)

Type of change

  • Bug fix
  • New feature
  • Refactoring (no behavior change)
  • Documentation
  • Tests only
  • Build / CI / tooling
  • Other

Areas affected

  • Frontend (UI / panel pages)
  • Backend (API endpoints, login, settings)
  • Xray config generation
  • Subscription (share links / Clash / JSON)
  • Statistics / traffic counters
  • Database / migrations
  • Install / upgrade script
  • Docker image
  • Multi-node (sub-nodes)
  • Telegram bot

How was this tested?

  1. Create Client 1. Copy its SubID.
  2. Create Client 2 using Client 1’s SubID.
  3. Retrieve the URLs using the subscription and the SubID used earlier. Both clients should be returned.

Breaking changes

None

Checklist

  • I tested the change locally and confirmed the described behavior.
  • I added or updated tests for the new behavior (when applicable).
  • go build ./... and the test suite pass locally.
  • For frontend changes: npm run lint, npm run typecheck, and npm run build pass.
  • I updated the Wiki / README / API docs if user-facing behavior changed.
  • My commits follow the project's existing message style.
  • I have no unrelated changes mixed into this PR.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/5029 **Author:** [@Ponywka](https://github.com/Ponywka) **Created:** 6/6/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feature/multiclient-in-one-group` --- ### 📝 Commits (1) - [`2df950f`](https://github.com/MHSanaei/3x-ui/commit/2df950f28ccd67c825176f4089402fcddbe040dd) fix(clients): disable enforcing unique subId per client like email ### 📊 Changes **1 file changed** (+0 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `web/service/client.go` (+0 -24) </details> ### 📄 Description ## Summary This change allows to use one SubID for different clients. This reverts commit 88a3677318116615ce80a4a2e6b5b9c3e7bea93e. ## Why I provide several URLs on one inbound to my friends to prevent connection collision when they are trying connect to my servers on a different devices. I don't know why but for reasons unknown to me, in rare cases where multiple connections are established from different devices, connection issues arise. In addition, following the implementation of the node-based system, when migrating from v2.x to v3.x, different UUIDs are currently being used for the same clients across different servers, which makes it difficult to consolidate them all into a single subscription due to this rule. Formally it should looks like: Inbounds+Clients: | Node | Email | UUID | SubID | |---|---|---|---| | SomeOfHost | Fred (PC) | 0f700c16-8c7c-4e0f-ae82-870cdbce2863 | aljqd0mwtd6sfek7 | | AbstractServer | Fred (PC) | f668dcb2-7102-43a0-9228-b181bcb200c0 | aljqd0mwtd6sfek7 | | SomeOfHost | Fred (Smartphone) | c8ca992b-e1e7-4c0c-8a8e-3a1c2f774c0f | aljqd0mwtd6sfek7 | | AbstractServer | Fred (Smartphone) | 86e7b788-2782-412e-a22a-2c3275868767 | aljqd0mwtd6sfek7 | | SomeOfHost | Jack (PC) | 2849f8e7-4619-4cd5-908b-ea3b12305a0f | vjspmfh3noukdeiy | | AbstractServer | Jack (PC) | ca581956-5d40-407c-a2e5-4c5f068e4b37 | vjspmfh3noukdeiy | | SomeOfHost | Jack (Smartphone) | 38e712af-d762-4b54-abd0-721037d0bea5 | vjspmfh3noukdeiy | | AbstractServer | Jack (Smartphone) | 036be987-edf0-4ac8-8f40-711d0ab40a2b | vjspmfh3noukdeiy | Sub `aljqd0mwtd6sfek7`: ``` SomeOfHost - Fred (PC) AbstractServer - Fred (PC) SomeOfHost - Fred (Smartphone) AbstractServer - Fred (Smartphone) ``` Sub `vjspmfh3noukdeiy`: ``` SomeOfHost - Jack (PC) AbstractServer - Jack (PC) SomeOfHost - Jack (Smartphone) AbstractServer - Jack (Smartphone) ``` ## Type of change - [ ] Bug fix - [ ] New feature - [ ] Refactoring (no behavior change) - [ ] Documentation - [ ] Tests only - [ ] Build / CI / tooling - [x] Other ## Areas affected - [ ] Frontend (UI / panel pages) - [x] Backend (API endpoints, login, settings) - [ ] Xray config generation - [x] Subscription (share links / Clash / JSON) - [ ] Statistics / traffic counters - [ ] Database / migrations - [ ] Install / upgrade script - [ ] Docker image - [ ] Multi-node (sub-nodes) - [ ] Telegram bot ## How was this tested? 1. Create Client 1. Copy its SubID. 2. Create Client 2 using Client 1’s SubID. 3. Retrieve the URLs using the subscription and the SubID used earlier. Both clients should be returned. ## Breaking changes None ## Checklist - [x] I tested the change locally and confirmed the described behavior. - [x] I added or updated tests for the new behavior (when applicable). - [x] `go build ./...` and the test suite pass locally. - [x] For frontend changes: `npm run lint`, `npm run typecheck`, and `npm run build` pass. - [x] I updated the Wiki / README / API docs if user-facing behavior changed. - [x] My commits follow the project's existing message style. - [x] I have no unrelated changes mixed into this PR. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:03:52 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#5758
No description provided.