From 803689a9cc18c1263a80e8ec8ff6f6cca2737342 Mon Sep 17 00:00:00 2001 From: Seyed Mahdi <39972836+SeyedHashtag@users.noreply.github.com> Date: Mon, 20 Jan 2025 00:00:36 +0330 Subject: [PATCH] Added total traffic calculation --- core/scripts/hysteria2/server_info.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/scripts/hysteria2/server_info.sh b/core/scripts/hysteria2/server_info.sh index 72b25c1..64d150c 100644 --- a/core/scripts/hysteria2/server_info.sh +++ b/core/scripts/hysteria2/server_info.sh @@ -65,6 +65,10 @@ if [ -f "$USERS_FILE" ]; then total_download_human=$(convert_bytes $total_download) echo "🔼${total_upload_human} uploaded" - echo "🔽${total_download_human} downloaded" + + # Add total traffic calculation + total_traffic=$((total_upload + total_download)) + total_traffic_human=$(convert_bytes $total_traffic) + echo "📊 ${total_traffic_human} total traffic" fi