mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 04:39:23 +08:00
fix xray-stat
This commit is contained in:
@@ -595,10 +595,10 @@ inputs:
|
||||
for i in {0..${toString ((length userList) - 1)}}
|
||||
do
|
||||
upload_bytes=$(${xray} api stats --server=127.0.0.1:6149 \
|
||||
-name "user>>>''${i}@xray.chn.moe>>>traffic>>>uplink" | , jq '.stat.value' | sed 's/"//g')
|
||||
-name "user>>>''${i}@xray.chn.moe>>>traffic>>>uplink" | jq '.stat.value' | sed 's/"//g')
|
||||
[ -z "$upload_bytes" ] && upload_bytes=0
|
||||
download_bytes=$(${xray} api stats --server=127.0.0.1:6149 \
|
||||
-name "user>>>''${i}@xray.chn.moe>>>traffic>>>downlink" | , jq '.stat.value' | sed 's/"//g')
|
||||
-name "user>>>''${i}@xray.chn.moe>>>traffic>>>downlink" | jq '.stat.value' | sed 's/"//g')
|
||||
[ -z "$download_bytes" ] && download_bytes=0
|
||||
traffic_gb=$(echo | ${awk} "{printf \"%.3f\",(''${upload_bytes}+''${download_bytes})/1073741824}")
|
||||
message="$message$i"'\t'"''${traffic_gb}"'G\n'
|
||||
|
||||
Reference in New Issue
Block a user