Skip to content
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

流量统计可用增加显示单位吗 #6

Closed
BrunuhVille opened this issue Dec 25, 2022 · 2 comments
Closed

流量统计可用增加显示单位吗 #6

BrunuhVille opened this issue Dec 25, 2022 · 2 comments

Comments

@BrunuhVille
Copy link

大佬您好
data usage: {"up":1393344,"down":123816228}
希望流量统计可以增加显示单位例如mb、gb

@eastmaple
Copy link
Owner

请向caddy的trojan插件原作者反馈,脚本只是用来自动化部署,没有做任何程序上的处理

@Edcwsyh
Copy link

Edcwsyh commented Nov 2, 2023

可以简单封装一下密码脚本, 会打印所有密码并转化为MB单位
./mytrojan.sh status $(./mytrojan.sh list) | awk -F'[:,]' '{up=$3/1024/1024; down=$5/1024/1024; printf "%s : {\"up\":%.2f MB,\"down\":%.2f MB}\n", $1, up, down}'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants