From f592dcd4e1630dc872dc739557b0c459531fda24 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Thu, 6 May 2021 16:32:24 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=9F=9F=E5=90=8D=E9=80=9A=E8=BF=87cloudflare=E6=81=B6?= =?UTF-8?q?=E6=84=8F=E8=A7=A3=E6=9E=90=E5=8F=AF=E8=AE=BF=E9=97=AE=E7=BD=91?= =?UTF-8?q?=E7=AB=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/install.sh b/install.sh index 11aa6a2..110b2c5 100644 --- a/install.sh +++ b/install.sh @@ -551,24 +551,29 @@ updateRedirectNginxConf() { # shellcheck disable=SC2154 return 301 https://${domain}$request_uri; } + server { + listen 31300; + server_name _; + return 403; + } EOF 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';} - } + 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 else cat <>/etc/nginx/conf.d/alone.conf @@ -583,8 +588,8 @@ EOF location / { add_header Strict-Transport-Security "max-age=63072000" always; } - # location ~ /.well-known {allow all;} - # location /test {return 200 'fjkvymb6len';} + # location ~ /.well-known {allow all;} + # location /test {return 200 'fjkvymb6len';} } EOF fi @@ -3748,7 +3753,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v2.4.19" + echoContent green "当前版本:v2.4.20" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus