3x-ui/web
MHSanaei ef066a19fc
feat(inbounds): one client identity across multiple inbounds via subId
Lets the operator add the same email under the same subId to several
inbounds. Xray reports traffic per email, so a single client_traffics
row acts as the shared accumulator — no aggregation overhead, quota and
expiry stay consistent.

- Email validation allows duplicates only when subId matches
- AddClientStat upserts via OnConflict DoNothing (idempotent on rerun)
- Stat/IP rows survive client deletion when a sibling inbound still
  references the email
- enrichClientStats tops up GORM-preloaded stats with rows whose
  inbound_id points at a sibling, so every panel view sees usage
- disableInvalidClients cascades enable=false and syncs the row's
  total/expiry into every sibling JSON when the shared identity expires
- DelDepletedClients removes the depleted client from all referencing
  inbounds, batched
- Subscription services dedupe traffic by email so shared quota is
  counted once

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 03:57:57 +02:00
..
controller revert(frontend): keep entry HTML files at frontend/ root 2026-05-09 02:36:26 +02:00
entity feat: add configurable auto-restart on client auto-disable 2026-05-04 23:19:25 +02:00
global Refactor code and fix linter warnings (#3627) 2026-01-05 05:54:56 +01:00
job fix(fail2ban): fix banning regression and Docker zero-jail issue 2026-05-07 13:53:34 +02:00
locale i18n: collapse two translation databases into a single web/translation/<lang>.json set 2026-05-08 18:05:56 +02:00
middleware Implement CSRF protection and security hardening across the application (#4179) 2026-05-07 23:36:11 +02:00
network docs: add comments for all functions 2025-09-20 09:35:50 +02:00
service feat(inbounds): one client identity across multiple inbounds via subId 2026-05-09 03:57:57 +02:00
session Implement CSRF protection and security hardening across the application (#4179) 2026-05-07 23:36:11 +02:00
translation i18n: collapse two translation databases into a single web/translation/<lang>.json set 2026-05-08 18:05:56 +02:00
websocket ws/inbounds: realtime fixes + perf for 10k+ client inbounds (#4123) 2026-05-05 17:27:49 +02:00
web.go chore: remove legacy template + asset trees and dead Go template engine 2026-05-09 01:08:05 +02:00