HirbodBehnam / MTProtoProxyInstaller

One-click script to install MTProto Proxy server on CentOS, Ubuntu and Debian
MIT License
824 stars 166 forks source link

Is it possible to query the data usage of each user? #60

Closed asd307769162 closed 2 years ago

asd307769162 commented 2 years ago

Since the script has "Change user quota options", it should be possible to count the traffic usage of all users. But I have tried various methods, but I can't find out how much traffic each user uses. Is there any way?

HirbodBehnam commented 2 years ago

Hello From script, no it's not possible. But you can get the quota usage from logs of the proxy using systemctl status mtprotoproxy -l

asd307769162 commented 2 years ago

I used "systemctl status mtprotoproxy -l", but it only shows the usage of the last 6 users, if I have 20 users, other users can't see it, can I list all users?

HirbodBehnam commented 2 years ago

You can use something like journalctl --unit=mtprotoproxy -n 100 --no-pager to get the last 100 lines.

asd307769162 commented 2 years ago

Thanks, it's ok.