mirror of
https://github.com/mack-a/v2ray-agent.git
synced 2026-09-02 13:56:37 +00:00
fix(脚本): 修复更换域名时订阅无法正常拉取的问题
This commit is contained in:
+11
-3
@@ -356,9 +356,17 @@ readNginxSubscribe() {
|
|||||||
if [[ -f "${nginxConfigPath}subscribe.conf" ]]; then
|
if [[ -f "${nginxConfigPath}subscribe.conf" ]]; then
|
||||||
if grep -q "sing-box" "${nginxConfigPath}subscribe.conf"; then
|
if grep -q "sing-box" "${nginxConfigPath}subscribe.conf"; then
|
||||||
subscribePort=$(grep "listen" "${nginxConfigPath}subscribe.conf" | awk '{print $2}')
|
subscribePort=$(grep "listen" "${nginxConfigPath}subscribe.conf" | awk '{print $2}')
|
||||||
if ! grep "listen" "${nginxConfigPath}subscribe.conf" | grep -q "ssl"; then
|
subscribeDomain=$(grep "server_name" "${nginxConfigPath}subscribe.conf" | awk '{print $2}')
|
||||||
subscribeType="http"
|
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
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -9392,7 +9400,7 @@ menu() {
|
|||||||
cd "$HOME" || exit
|
cd "$HOME" || exit
|
||||||
echoContent red "\n=============================================================="
|
echoContent red "\n=============================================================="
|
||||||
echoContent green "作者:mack-a"
|
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 "Github:https://github.com/mack-a/v2ray-agent"
|
||||||
echoContent green "描述:八合一共存脚本\c"
|
echoContent green "描述:八合一共存脚本\c"
|
||||||
showInstallStatus
|
showInstallStatus
|
||||||
|
|||||||
Reference in New Issue
Block a user