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 1/2] 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 From 628cb99257337f20537d28a7c25130c457416622 Mon Sep 17 00:00:00 2001 From: Seyed Mahdi <39972836+SeyedHashtag@users.noreply.github.com> Date: Mon, 20 Jan 2025 00:01:27 +0330 Subject: [PATCH 2/2] Added total traffic calculation --- core/scripts/hysteria2/server_info.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/core/scripts/hysteria2/server_info.sh b/core/scripts/hysteria2/server_info.sh index 64d150c..335dbed 100644 --- a/core/scripts/hysteria2/server_info.sh +++ b/core/scripts/hysteria2/server_info.sh @@ -67,7 +67,6 @@ if [ -f "$USERS_FILE" ]; then 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"