mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-05 12:44:22 +00:00
client_traffics is keyed by email (one shared row per client across every inbound it is attached to). addClientTraffic filtered with `inbound_id NOT IN (node inbounds)`, so when a client was attached to both a node inbound and the mother inbound and the node inbound was attached first, the shared row carried the node inbound's id (AddClientStat uses OnConflict DoNothing and never refreshes it) and the local xray's traffic for that client was dropped entirely. The client showed online but its usage stayed at zero unless the mother inbound happened to be attached first. Match purely by email instead. The reported emails come only from the local xray, which only knows local-attached clients, so the query is still correctly scoped, and this also repairs already-broken rows that a per-row AddClientStat fix alone could not. |
||
|---|---|---|
| .. | ||
| controller | ||
| entity | ||
| global | ||
| job | ||
| locale | ||
| middleware | ||
| network | ||
| runtime | ||
| service | ||
| session | ||
| translation | ||
| websocket | ||
| web.go | ||