From a6fb0f18981df71b37d929748981d02641aae3fb Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Mon, 22 Jul 2024 11:08:04 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=84=9A=E6=9C=AC):=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=90=AD=E5=BB=BA=E6=97=B6=E6=A3=80=E6=B5=8BIPv6=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index c206948..df4d5aa 100644 --- a/install.sh +++ b/install.sh @@ -1312,10 +1312,15 @@ checkPortOpen() { handleNginx stop # 初始化nginx配置 touch ${nginxConfigPath}checkPortOpen.conf + local listenIPv6PortConfig= + + if [[ -n $(curl -s -6 http://www.cloudflare.com/cdn-cgi/trace | grep "ip" | cut -d "=" -f 2) ]]; then + listenIPv6PortConfig="listen [::]:${port};" + fi cat <${nginxConfigPath}checkPortOpen.conf server { listen ${port}; - listen [::]:${port}; + ${listenIPv6PortConfig} server_name ${domain}; location /checkPort { return 200 'fjkvymb6len'; @@ -9443,7 +9448,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v3.3.11" + echoContent green "当前版本:v3.3.12" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus