From d9483a8b7616e08c27563ede106861464059fd47 Mon Sep 17 00:00:00 2001 From: Whispering Wind <151555003+ReturnFI@users.noreply.github.com> Date: Sat, 15 Feb 2025 23:46:00 +0330 Subject: [PATCH] Hotfix: Prevent masquerade enable when webpanel active --- menu.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/menu.sh b/menu.sh index 32bd617..a58ec80 100644 --- a/menu.sh +++ b/menu.sh @@ -754,11 +754,15 @@ masquerade_handler() { case $option in 1) - read -p "Enter the URL for rewriteHost: " url - if [ -z "$url" ]; then - echo "Error: URL cannot be empty. Please try again." + if systemctl is-active --quiet hysteria-webpanel.service; then + echo -e "${red}Error:${NC} Masquerade cannot be enabled because hysteria-webpanel.service is running." else - python3 $CLI_PATH masquerade -e "$url" + read -p "Enter the URL for rewriteHost: " url + if [ -z "$url" ]; then + echo "Error: URL cannot be empty. Please try again." + else + python3 $CLI_PATH masquerade -e "$url" + fi fi ;; 2)