mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
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#5808
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/5182
Author: @rqzbeh
Created: 6/10/2026
Status: ❌ Closed
Base:
main← Head:fix/duplicate-sub-links📝 Commits (1)
f61d5a4fix: deduplicate clients in subscription links (#5134)📊 Changes
3 files changed (+21 additions, -0 deletions)
View changed files
📝
internal/sub/clash_service.go(+7 -0)📝
internal/sub/json_service.go(+7 -0)📝
internal/sub/service.go(+7 -0)📄 Description
Fixes #5134.
Summary
This PR deduplicates clients by email when building subscription links, JSON, and Clash configs.
Why
Closes #5134
When generating subscription data (\GetSubs, \GetJson, \GetClash), the code iterated over the legacy \settings.clients\ array of an inbound without guarding against duplicates. If a remote node's DB (or legacy state) contained duplicate client objects for the same \subId, the subscription builder emitted duplicate links or proxy objects. This fix explicitly deduplicates clients by their unique email per inbound before appending them to the output, ensuring clean subscriptions regardless of dirty DB state.
Type of change
Areas affected
How was this tested?
Screenshots / recordings
N/A
Breaking changes
None.
Checklist
pm run lint,
pm run typecheck, and
pm run build\ pass.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.