From e0268acbce0a0d7575615b68a9ad2f5f2cfd9a6e Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Tue, 2 Jul 2024 11:15:02 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=84=9A=E6=9C=AC):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E5=9F=9F=E5=90=8D=E6=97=B6=E8=AE=A2=E9=98=85?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=AD=A3=E5=B8=B8=E6=8B=89=E5=8F=96=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index ecf79ad..cabef02 100644 --- a/install.sh +++ b/install.sh @@ -356,9 +356,17 @@ readNginxSubscribe() { if [[ -f "${nginxConfigPath}subscribe.conf" ]]; then if grep -q "sing-box" "${nginxConfigPath}subscribe.conf"; then subscribePort=$(grep "listen" "${nginxConfigPath}subscribe.conf" | awk '{print $2}') - if ! grep "listen" "${nginxConfigPath}subscribe.conf" | grep -q "ssl"; then - subscribeType="http" + subscribeDomain=$(grep "server_name" "${nginxConfigPath}subscribe.conf" | awk '{print $2}') + subscribeDomain=${subscribeDomain//;/} + if [[ "${subscribeDomain}" != "${currentHost}" ]]; then + subscribePort= + subscribeType= + else + if ! grep "listen" "${nginxConfigPath}subscribe.conf" | grep -q "ssl"; then + subscribeType="http" + fi fi + fi fi } @@ -9392,7 +9400,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v3.3.5" + echoContent green "当前版本:v3.3.6" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus