fix(脚本): 修复更换域名时订阅无法正常拉取的问题

pull/1073/head
mack-a 2024-07-02 11:15:02 +08:00
parent 3071ec8e08
commit e0268acbce
1 changed files with 11 additions and 3 deletions

View File

@ -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 "Githubhttps://github.com/mack-a/v2ray-agent"
echoContent green "描述:八合一共存脚本\c"
showInstallStatus