3x-ui/internal
Kuzz007 1aa81428b8 fix(traffic): show live Speed for AmneziaWG and MTProto inbounds/clients
The Speed column showed "--" for AmneziaWG (and MTProto, which has the
identical gap) even while cumulative traffic totals were correct.
XrayTrafficJob drives live speed by querying xray-core's own stats API
and broadcasting the delta over websocket -- but AmneziaWG/MTProto never
run inside xray-core's own runtime inbounds, so they're invisible to
that API. Their own jobs already compute the same per-poll delta shape
(that's what keeps cumulative totals correct) but never broadcast it.

Reusing the existing "traffics"/"clientTraffics" broadcast would have
two real bugs: the frontend's existing scope/replace logic would let
each side clobber the other's speed on its next unrelated tick, and the
websocket hub's per-message-type throttle is keyed only by message type,
not caller -- since both sidecar jobs run on identical "@every 10s"
grids registered milliseconds apart, one would silently lose almost
every broadcast if both protocols were ever configured together.

Fixed with a small unthrottled broadcast path (both sidecar jobs are
already self-rate-limited by their own cron cadence) and protocol-
namespaced wire keys, tracked in their own frontend state and merged
into the existing inboundSpeed/clientSpeed only at read time -- so every
existing consumer needs zero changes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-26 18:27:23 +03:00
..
amneziawg fix(amneziawg): resolve 4 Low findings from the automated PR review 2026-07-26 11:16:39 +03:00
config chore(release): bump version to 3.5.0-awg.2 2026-07-26 12:44:47 +03:00
database refactor(amneziawg): route via Xray through the stock Routing page, not custom toggles 2026-07-25 22:37:08 +03:00
eventbus Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
logger fix(inbounds): apply runtime changes after the DB commit (#5768) 2026-07-08 22:12:28 +02:00
mtproto refactor: modernize Go with strings.SplitSeq and maps.Copy 2026-07-08 22:10:54 +02:00
sub fix(sub): include amneziawg inbounds in subscription links 2026-07-26 11:42:11 +03:00
tunnelmonitor style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
util Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
web fix(traffic): show live Speed for AmneziaWG and MTProto inbounds/clients 2026-07-26 18:27:23 +03:00
xray Bug-label issue sweep: 16 fixes (#6083) 2026-07-23 15:34:42 +02:00