From 947c4637585b3bf543386b96f3ec11a988b4c357 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Fri, 7 May 2021 17:27:06 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=A6=96=E6=AC=A1=E5=AE=89=E8=A3=85=E6=98=AF=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E5=AE=89=E8=A3=85gRPC=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 69 +++++++++++++++++++----------------------------------- 1 file changed, 24 insertions(+), 45 deletions(-) diff --git a/install.sh b/install.sh index 0417cb8..600dafc 100644 --- a/install.sh +++ b/install.sh @@ -549,8 +549,8 @@ EOF sudo yum-config-manager --enable nginx-mainline fi ${installType} nginx >/dev/null 2>&1 - systemctl daemon-reload >/dev/null 2>&1 - systemctl enable nginx >/dev/null 2>&1 + systemctl daemon-reload + systemctl enable nginx } # 初始化Nginx申请证书配置 @@ -617,54 +617,33 @@ updateRedirectNginxConf() { return 403; } EOF - if [[ "${coreInstallType}" == "1" ]] && [[ -n $(echo ${selectCustomInstallType} | grep 5) || -z "${selectCustomInstallType}" ]]; then + if [[ "${selectCoreType}" == "1" ]] && [[ -n $(echo ${selectCustomInstallType} | grep 5) || -z ${selectCustomInstallType} ]]; then cat <>/etc/nginx/conf.d/alone.conf - server { - listen 31302 http2; - server_name ${domain}; - root /usr/share/nginx/html; - location /${currentPath}grpc { - grpc_pass grpc://127.0.0.1:31301; - } - } +server { + listen 31302 http2; + server_name ${domain}; + root /usr/share/nginx/html; + location /${currentPath}grpc { + grpc_pass grpc://127.0.0.1:31301; + } +} EOF fi - if [[ "${debianVersion}" == "8" ]]; then cat <>/etc/nginx/conf.d/alone.conf - server { - listen 31300; - server_name ${domain}; - root /usr/share/nginx/html; - location /s/ { - add_header Content-Type text/plain; - alias /etc/v2ray-agent/subscribe/; - } - # location / { - # add_header Strict-Transport-Security "max-age=63072000" always; - # } - # location ~ /.well-known {allow all;} - # location /test {return 200 'fjkvymb6len';} - } +server { + listen 31300; + server_name ${domain}; + root /usr/share/nginx/html; + location /s/ { + add_header Content-Type text/plain; + alias /etc/v2ray-agent/subscribe/; + } + location / { + add_header Strict-Transport-Security "max-age=63072000" always; + } +} EOF - else - cat <>/etc/nginx/conf.d/alone.conf - server { - listen 31300; - server_name ${domain}; - root /usr/share/nginx/html; - location /s/ { - add_header Content-Type text/plain; - alias /etc/v2ray-agent/subscribe/; - } - location / { - add_header Strict-Transport-Security "max-age=63072000" always; - } - # location ~ /.well-known {allow all;} - # location /test {return 200 'fjkvymb6len';} - } -EOF - fi } @@ -3823,7 +3802,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v2.4.22" + echoContent green "当前版本:v2.4.23" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus