From 3d039ec5dab54a418738647403141375a7949467 Mon Sep 17 00:00:00 2001 From: Hai HUANG <101720804+maple367@users.noreply.github.com> Date: Thu, 29 Feb 2024 20:45:16 +0800 Subject: [PATCH] modified: x-ui.sh --- x-ui.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/x-ui.sh b/x-ui.sh index 0971004f..c69bf0fc 100644 --- a/x-ui.sh +++ b/x-ui.sh @@ -605,8 +605,10 @@ EOF start_port=$(echo $port | cut -d'-' -f1) end_port=$(echo $port | cut -d'-' -f2) # Loop through the range and open each port - for ((i = start_port; i <= end_port; i++)); do + i=$start_port + while [ $i -le $end_port ]; do ufw allow $i + i=$((i + 1)) done else ufw allow "$port"