3x-ui/internal/sub
MHSanaei 7fe082a7f1 fix(nodes): stop multi-attached client traffic inflating across node inbounds
Xray counts client traffic globally per email, so a client attached to
several of a node's inbounds has its single shared counter copied onto
every inbound by the node's enriched inbound list. When those copies
diverge (legacy per-inbound rows surviving a v3.2.x->v3.3.x upgrade, or
any drift) the per-inbound delta loop read the lower sibling as a
node-counter reset and re-added its full value, inflating the client far
past real usage (#5274).

Fold each email to its per-field node-wide max before the delta loop so
every occurrence is equal: the per-email baseline dedup then holds and
the reset clamp never misfires.
2026-06-15 19:31:57 +02:00
..
build_urls_test.go fix(subscriptions): avoid shared mutable state during generation (#5270) 2026-06-15 16:23:47 +02:00
clash_external.go feat(sub): per-client external links and remote subscriptions 2026-06-14 20:57:14 +02:00
clash_service.go fix(subscriptions): avoid shared mutable state during generation (#5270) 2026-06-15 16:23:47 +02:00
clash_service_test.go fix(subscriptions): avoid shared mutable state during generation (#5270) 2026-06-15 16:23:47 +02:00
controller.go fix(subscriptions): avoid shared mutable state during generation (#5270) 2026-06-15 16:23:47 +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
external_config.go feat(sub): per-client external links and remote subscriptions 2026-06-14 20:57:14 +02:00
external_config_test.go feat(sub): per-client external links and remote subscriptions 2026-06-14 20:57:14 +02:00
external_only_sub_test.go fix(subscriptions): avoid shared mutable state during generation (#5270) 2026-06-15 16:23:47 +02:00
external_subscription.go feat(sub): per-client external links and remote subscriptions 2026-06-14 20:57:14 +02:00
json_service.go fix(subscriptions): avoid shared mutable state during generation (#5270) 2026-06-15 16:23:47 +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
mutation_audit_test.go Test-quality audit: fix 2 prod bugs, strengthen weak tests, add mutation/fuzz/CI tooling (#5345) 2026-06-15 15:17:03 +02:00
service.go fix(subscriptions): avoid shared mutable state during generation (#5270) 2026-06-15 16:23:47 +02:00
service_dedup_test.go Test-quality audit: fix 2 prod bugs, strengthen weak tests, add mutation/fuzz/CI tooling (#5345) 2026-06-15 15:17:03 +02:00
service_flow_test.go fix(sub): deliver vision flow for VLESS+XHTTP+REALITY in share links and Clash (#5232) 2026-06-12 22:25:04 +02:00
service_property_test.go fix(nodes): stop multi-attached client traffic inflating across node inbounds 2026-06-15 19:31:57 +02:00
service_sharelink_test.go Test-quality audit: fix 2 prod bugs, strengthen weak tests, add mutation/fuzz/CI tooling (#5345) 2026-06-15 15:17:03 +02:00
service_sort_test.go feat(sub): per-inbound sort order for subscription links 2026-06-12 12:03:22 +02:00
service_test.go fix(links): bracket ipv6 hosts in share links and qr codes (#5310) 2026-06-14 23:38:58 +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