mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-07-13 08:06:06 +00:00
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.
This commit is contained in:
@@ -15,9 +15,9 @@ func TestDefaultPort(t *testing.T) {
|
||||
}{
|
||||
{"", 443, 443},
|
||||
{"8080", 443, 8080},
|
||||
{"0", 443, 443}, // non-positive falls back
|
||||
{"-1", 443, 443}, // negative falls back
|
||||
{"abc", 443, 443}, // unparseable falls back
|
||||
{"0", 443, 443}, // non-positive falls back
|
||||
{"-1", 443, 443}, // negative falls back
|
||||
{"abc", 443, 443}, // unparseable falls back
|
||||
{"65535", 443, 65535},
|
||||
}
|
||||
for _, c := range cases {
|
||||
|
||||
Reference in New Issue
Block a user