3x-ui/internal/sub
MHSanaei 1b0dbf8e6d fix(sub): deduplicate settings.clients entries per inbound in subscription output (#5134)
Multi-node sync/import drift can leave the same client twice inside an
inbound's legacy settings.clients JSON while the normalized
client_inbounds table stays clean (SyncInbound dedupes the rows it
writes but never rewrites the JSON). All three subscription builders
iterated that JSON verbatim, so every duplicate entry became a
duplicate profile in the raw, Clash, and JSON output.

Filter and dedupe by email in one shared helper (link generation keys
purely on inbound + email, so same-email entries are pure duplicates
and dropping them is lossless). The clash/json services' own
inboundService copies became unused and are removed.
2026-06-11 22:19:14 +02:00
..
build_urls_test.go fix: derive JSON/Clash subscription URLs from configured subURI (#5203) 2026-06-11 20:05:38 +02:00
clash_service.go fix(sub): deduplicate settings.clients entries per inbound in subscription output (#5134) 2026-06-11 22:19:14 +02:00
clash_service_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
controller.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
controller_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
default.json refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
dist.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
json_service.go fix(sub): deduplicate settings.clients entries per inbound in subscription output (#5134) 2026-06-11 22:19:14 +02:00
json_service_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
links.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
links_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
service.go fix(sub): deduplicate settings.clients entries per inbound in subscription output (#5134) 2026-06-11 22:19:14 +02:00
service_dedup_test.go fix(sub): deduplicate settings.clients entries per inbound in subscription output (#5134) 2026-06-11 22:19:14 +02:00
service_test.go fix(sub): honor per-inbound share address strategy in subscription output (#5208) 2026-06-11 21:31:27 +02:00
service_userinfo_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
sub.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00