From 5bd891c2e71ef35eba50088b9588a9630faec202 Mon Sep 17 00:00:00 2001 From: Verum Date: Fri, 6 Mar 2026 18:17:25 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20mtproto.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mtproto.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mtproto.sh b/mtproto.sh index d7730ce..08c1ece 100644 --- a/mtproto.sh +++ b/mtproto.sh @@ -45,6 +45,14 @@ read -p "Enter MTProto port (default 443): " PORT # Если переменная пустая — подставляем значение по умолчанию PORT=${PORT:-443} +# ----------------------------------------------------------------------------- +# Если установлен UFW — открываем порт +# ----------------------------------------------------------------------------- +if command -v ufw >/dev/null 2>&1; then + echo "Opening port $PORT in UFW firewall..." + ufw allow "$PORT"/tcp comment "MTPROTO-TCP" || true + ufw allow "$PORT"/udp comment "MTPROTO-UDP" || true +fi # ----------------------------------------------------------------------------- # Запрос TAG.