Skip to content

Commit

Permalink
fix(脚本): 修改搭建时检测IPv6配置
Browse files Browse the repository at this point in the history
  • Loading branch information
mack-a committed Jul 22, 2024
1 parent 50098b2 commit a6fb0f1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF >${nginxConfigPath}checkPortOpen.conf
server {
listen ${port};
listen [::]:${port};
${listenIPv6PortConfig}
server_name ${domain};
location /checkPort {
return 200 'fjkvymb6len';
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a6fb0f1

Please sign in to comment.