From 1e94d39a2b6ec5b0f96f8ef9c6f96bff0943e876 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Wed, 29 Nov 2023 16:22:52 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E4=BC=98=E5=8C=96n?= =?UTF-8?q?ginx=E4=B8=8D=E5=90=8C=E7=89=88=E6=9C=AC=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/install.sh b/install.sh index fbc26a3..62f496d 100644 --- a/install.sh +++ b/install.sh @@ -1231,6 +1231,10 @@ updateRedirectNginxConf() { nginxH2Conf="listen 127.0.0.1:31302 http2 so_keepalive=on;" nginxVersion=$(nginx -v 2>&1) + if echo "${nginxVersion}" | grep -q "1.25"; then + nginxH2Conf="listen 127.0.0.1:31302 so_keepalive=on;http2 on;" + fi + cat <${nginxConfigPath}alone.conf server { listen 127.0.0.1:31300; @@ -1241,9 +1245,6 @@ EOF if echo "${selectCustomInstallType}" | grep -q 2 && echo "${selectCustomInstallType}" | grep -q 5 || [[ -z "${selectCustomInstallType}" ]]; then - if echo "${nginxVersion}" | grep -q "1.25"; then - nginxH2Conf="listen 127.0.0.1:31302 so_keepalive=on;http2 on;" - fi cat <>${nginxConfigPath}alone.conf server { ${nginxH2Conf} @@ -1284,9 +1285,6 @@ server { } EOF elif echo "${selectCustomInstallType}" | grep -q 5 || [[ -z "${selectCustomInstallType}" ]]; then - if echo "${nginxVersion}" | grep -q "1.25"; then - nginxH2Conf="listen 127.0.0.1:31302 so_keepalive=on;http2 on;" - fi cat <>${nginxConfigPath}alone.conf server { ${nginxH2Conf} @@ -1298,7 +1296,6 @@ server { } location /${currentPath}grpc { client_max_body_size 0; -# keepalive_time 1071906480m; keepalive_requests 4294967296; client_body_timeout 1071906480m; send_timeout 1071906480m; @@ -1311,9 +1308,6 @@ server { EOF elif echo "${selectCustomInstallType}" | grep -q 2 || [[ -z "${selectCustomInstallType}" ]]; then - if echo "${nginxVersion}" | grep -q "1.25"; then - nginxH2Conf="listen 127.0.0.1:31302 so_keepalive=on;http2 on;" - fi cat <>${nginxConfigPath}alone.conf server { ${nginxH2Conf} @@ -1337,9 +1331,6 @@ server { } EOF else - if echo "${nginxVersion}" | grep -q "1.25"; then - nginxH2Conf="listen 127.0.0.1:31302 so_keepalive=on;http2 on;" - fi cat <>${nginxConfigPath}alone.conf server { @@ -8462,7 +8453,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v2.11.20" + echoContent green "当前版本:v2.11.21" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus