-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🆘 get global traffic stats from an v2ray config (ask from android devs) #2723
Comments
provide logs from the Xray service, which might contain hints as to why the connection is failing or why the stats cannot be fetched. check if the service is active:
To fetch stats, ensure that the stats feature is correctly configured. add a stats object in your configuration :
ensure that the inbound settings include a section for the API:
The stats query command seems to be malformed. The correct format should not include spaces around the equals sign xray api statsquery --server=127.0.0.1:10800 error messages failed to dial 127.0.0.1:22222 and failed to dial 13.43.63.65:22222 suggest that is trying to query stats from the wrong port or address. |
@us254 thanks for replay dear. I changed my config like what you said:
but still getting error how can monitor and see logs? if I see logs, so may know whats the problem. |
Please see document https://guide.v2fly.org/advanced/traffic.html#%E9%85%8D%E7%BD%AE%E7%BB%9F%E8%AE%A1%E5%8A%9F%E8%83%BD |
Im a android developer and using this lib instead of v2ray. but i have a problem.
i want to get current traffic from an v2ray config:
here is my v2ray config
and my command is :
xray api statsquery --server=127.0.0.1:10808
I always use v2ray configs like this and everything works fine. but I cant fetch global traffic stats from an active config.
also used below commands:
xray api statsquery --server=127.0.0.1:10808
xray api statsquery --server=127.0.0.1:10809
xray api statsquery --server=127.0.0.1:22222
xray api statsquery --server=13.43.63.65:22222
but none of them is not working and i getting this error:
failed to dial 127.0.0.1:22222
1 - do I need to add user to my config? is there any can help me how should pass users with email to my sample config?
2 - I always can fetch used traffic in v2ray via below commands:
this code referring to github.com/2dust/AndroidLibV2rayLite/blob/0c32df27 - goLANG
there is no need to add any user to config. so does xray need to add user with their email for this like what it saying here ? what is problem Exactly?
here is my builder
and tun2socks
🆘 android developer I needs you to help me about it. I can share more info if needed 🆘
The text was updated successfully, but these errors were encountered: