From c3ce50d058fd2610aad0c0d4b8979ad9cedc904f Mon Sep 17 00:00:00 2001 From: Gilles Mouchet Date: Wed, 17 Sep 2025 14:02:10 +0200 Subject: [PATCH] v1.0.0 --- README.md | 3 ++- stop-output-traffic-http-https.sh | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 79887a6..569d9be 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,8 @@ Server proxy ## Installation N/A ## Usage -./stop-output-traffic-http-https.sh +sudo ./stop-output-traffic-http-https.sh +The script takes a few minutes to apply the rules ### Changelog ### [1.0.0] - 2025-09-17 diff --git a/stop-output-traffic-http-https.sh b/stop-output-traffic-http-https.sh index 555b10e..42bde20 100755 --- a/stop-output-traffic-http-https.sh +++ b/stop-output-traffic-http-https.sh @@ -22,6 +22,11 @@ version="1.0.0" set -euo pipefail +# check if the effective user ID is 0 (root) +if [[ $EUID -ne 0 ]]; then + echo "This script must be run as root or with sudo." + exit 1 +fi # ---------------------- CONFIG ---------------------- PROXY_NAME="proxy.ville-geneve.ch" PROXY_PORT="8080"