mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6458] [MERGED] fix(inbounds): serve fresh client UUIDs for list and allLinks #6280
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#6280
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/6458
Author: @mrchatam
Created: 9/11/2026
Status: ✅ Merged
Merged: 9/12/2026
Merged by: @MHSanaei
Base:
main← Head:fix/inbound-links-fresh-uuid📝 Commits (3)
918cd14fix(inbounds): serve fresh client UUIDs for list and allLinks (#6436)ebac8d8fix(sub): keep WG/AWG settings identity in link exports (#6436)1838f40fix(sub): fall back to settings clients for link export (#6458)📊 Changes
6 files changed (+325 additions, -12 deletions)
View changed files
📝
internal/sub/export_all_links_test.go(+180 -0)📝
internal/sub/links_test.go(+38 -0)📝
internal/sub/service.go(+33 -6)📝
internal/web/service/inbound.go(+8 -0)📝
internal/web/service/inbound_clients.go(+9 -6)➕
internal/web/service/inbound_clients_stale_uuid_test.go(+57 -0)📄 Description
Summary
Fixes #6436.
/inbounds/list(ClientStats.uuid) and/inbounds/allLinkswere reading client identity from the inbound's embeddedsettings.clients[]JSON. After some client edits that JSON can lag theclientstable / running Xray config, so the panel handed out dead UUIDs while subscription links still worked.This change keeps the write paths alone and only switches those two read paths to the normalized clients table (same source Xray already uses):
SubService.inboundLinks→InboundService.ListClientsForInbound(clientService.ListForInbound)backfillClientStats/enrichClientStats→clientService.ListForInboundso list enrichment uses the live UUID/SubIdNo settings-JSON rewrite/migration job.
Test plan
go test ./internal/sub/ -run TestInboundLinks_go test ./internal/web/service/ -run TestEnrichClientStats_UsesClientsTableUUIDWhenSettingsStale/panel/api/inbounds/list→clientStats[].uuidmatches/panel/api/clients/get/{email}and running Xray/panel/api/inbounds/allLinksembeds the fresh UUID (link works)/panel/api/clients/subLinks/{subId}unchanged/still works🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.