You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m using the Xray Core API to dynamically add users (VLESS, VMess, Trojan, XTLS) via gRPC. While users are successfully added and appear in the inbound list (checked with xray api inbounduser), I cannot see their traffic statistics using the statsquery API.
Steps to reproduce:
Start Xray with a configuration including API and StatsService:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Xray Core team,
I’m using the Xray Core API to dynamically add users (VLESS, VMess, Trojan, XTLS) via gRPC. While users are successfully added and appear in the inbound list (checked with xray api inbounduser), I cannot see their traffic statistics using the statsquery API.
Steps to reproduce:
Add a user dynamically via gRPC API (e.g., AlterInbound with AddUserOperation).
Query stats for the user:
xray api statsquery --server=127.0.0.1:62790 'user>>>[email protected]>>>traffic>>>uplink' 'user>>>[email protected]>>>traffic>>>downlink'
Expected result:
Traffic stats for the newly added user.
Actual result:
Empty result: {}
Additional information:
Config includes multiple inbounds: vless-in, vmess-in, trojan-in, vless-xtls-in.
Users are visible in inbound user list:
xray api inbounduser --server=127.0.0.1:62790 --tag=vless-in
The issue seems specific to users added via API; stat tracking works for users present in the static config.
Could you clarify if there is an extra step needed to enable per-user traffic stats for dynamically added users?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions