From fa670faa8f581bb699b7a53b882de4cadb6cc653 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Thu, 16 May 2024 10:36:50 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=84=9A=E6=9C=AC):=20=E4=BF=AE=E5=A4=8Dxr?= =?UTF-8?q?ay-core=E8=87=AA=E5=B7=B1=E5=81=B7=E8=87=AA=E5=B7=B1=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E4=BD=BF=E7=94=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 46 +++++++++++++--------------------------------- 1 file changed, 13 insertions(+), 33 deletions(-) diff --git a/install.sh b/install.sh index b89315b..4a430a6 100644 --- a/install.sh +++ b/install.sh @@ -1405,12 +1405,6 @@ server { client_header_timeout 1071906480m; keepalive_timeout 1071906480m; - location ~ ^/s/(clashMeta|default|clashMetaProfiles|sing-box|sing-box_profiles)/(.*) { - proxy_set_header X-Real-IP \$proxy_protocol_addr; - default_type 'text/plain; charset=utf-8'; - alias /etc/v2ray-agent/subscribe/\$1/\$2; - } - location /${currentPath}grpc { if (\$content_type !~ "application/grpc") { return 404; @@ -1446,11 +1440,7 @@ server { server_name ${domain}; root ${nginxStaticPath}; - location ~ ^/s/(clashMeta|default|clashMetaProfiles|sing-box|sing-box_profiles)/(.*) { - proxy_set_header X-Real-IP \$proxy_protocol_addr; - default_type 'text/plain; charset=utf-8'; - alias /etc/v2ray-agent/subscribe/\$1/\$2; - } + location /${currentPath}grpc { client_max_body_size 0; keepalive_requests 4294967296; @@ -1461,6 +1451,8 @@ server { grpc_send_timeout 1071906480m; grpc_pass grpc://127.0.0.1:31301; } + location / { + } } EOF @@ -1474,11 +1466,7 @@ server { server_name ${domain}; root ${nginxStaticPath}; - location ~ ^/s/(clashMeta|default|clashMetaProfiles|sing-box|sing-box_profiles)/(.*) { - proxy_set_header X-Real-IP \$proxy_protocol_addr; - default_type 'text/plain; charset=utf-8'; - alias /etc/v2ray-agent/subscribe/\$1/\$2; - } + location /${currentPath}trojangrpc { client_max_body_size 0; # keepalive_time 1071906480m; @@ -1490,6 +1478,8 @@ server { grpc_send_timeout 1071906480m; grpc_pass grpc://127.0.0.1:31301; } + location / { + } } EOF else @@ -1504,11 +1494,6 @@ server { server_name ${domain}; root ${nginxStaticPath}; - location ~ ^/s/(clashMeta|default|clashMetaProfiles|sing-box|sing-box_profiles)/(.*) { - proxy_set_header X-Real-IP \$proxy_protocol_addr; - default_type 'text/plain; charset=utf-8'; - alias /etc/v2ray-agent/subscribe/\$1/\$2; - } location / { } } @@ -1524,11 +1509,6 @@ server { real_ip_header proxy_protocol; root ${nginxStaticPath}; - location ~ ^/s/(clashMeta|default|clashMetaProfiles|sing-box|sing-box_profiles)/(.*) { - proxy_set_header X-Real-IP \$proxy_protocol_addr; - default_type 'text/plain; charset=utf-8'; - alias /etc/v2ray-agent/subscribe/\$1/\$2; - } location / { } } @@ -8098,6 +8078,8 @@ server { default_type 'text/plain; charset=utf-8'; alias /etc/v2ray-agent/subscribe/\$1/\$2; } + location / { + } } EOF bootStartup nginx @@ -8539,9 +8521,7 @@ initRandomSalt() { # 订阅 subscribe() { readInstallProtocolType - if [[ "${coreInstallType}" == "1" ]] && [[ "${selectCustomInstallType}" == ",7," || "${currentInstallProtocolType}" == ",7,8," ]] || [[ "${coreInstallType}" == "2" ]]; then - installSubscribe - fi + installSubscribe readNginxSubscribe if [[ "${coreInstallType}" == "1" || "${coreInstallType}" == "2" ]]; then @@ -8830,9 +8810,9 @@ initRealityClientServersName() { if [[ "${realityServerNameCurrentDomainStatus}" == "y" ]]; then realityServerName="${domain}" if [[ "${selectCoreType}" == "1" ]]; then - if [[ -n "${port}" ]]; then - realityDomainPort="${port}" - elif [[ -z "${subscribePort}" ]]; then + # if [[ -n "${port}" ]]; then + # realityDomainPort="${port}" + if [[ -z "${subscribePort}" ]]; then echo installSubscribe readNginxSubscribe @@ -9174,7 +9154,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v3.2.50" + echoContent green "当前版本:v3.2.51" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus