fix(脚本): 修复xray-core自己偷自己无法使用问题

pull/1054/head
mack-a 2024-05-16 10:36:50 +08:00
parent b94d4100a2
commit fa670faa8f
1 changed files with 13 additions and 33 deletions

View File

@ -1405,12 +1405,6 @@ server {
client_header_timeout 1071906480m; client_header_timeout 1071906480m;
keepalive_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 { location /${currentPath}grpc {
if (\$content_type !~ "application/grpc") { if (\$content_type !~ "application/grpc") {
return 404; return 404;
@ -1446,11 +1440,7 @@ server {
server_name ${domain}; server_name ${domain};
root ${nginxStaticPath}; 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 { location /${currentPath}grpc {
client_max_body_size 0; client_max_body_size 0;
keepalive_requests 4294967296; keepalive_requests 4294967296;
@ -1461,6 +1451,8 @@ server {
grpc_send_timeout 1071906480m; grpc_send_timeout 1071906480m;
grpc_pass grpc://127.0.0.1:31301; grpc_pass grpc://127.0.0.1:31301;
} }
location / {
}
} }
EOF EOF
@ -1474,11 +1466,7 @@ server {
server_name ${domain}; server_name ${domain};
root ${nginxStaticPath}; 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 { location /${currentPath}trojangrpc {
client_max_body_size 0; client_max_body_size 0;
# keepalive_time 1071906480m; # keepalive_time 1071906480m;
@ -1490,6 +1478,8 @@ server {
grpc_send_timeout 1071906480m; grpc_send_timeout 1071906480m;
grpc_pass grpc://127.0.0.1:31301; grpc_pass grpc://127.0.0.1:31301;
} }
location / {
}
} }
EOF EOF
else else
@ -1504,11 +1494,6 @@ server {
server_name ${domain}; server_name ${domain};
root ${nginxStaticPath}; 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 / { location / {
} }
} }
@ -1524,11 +1509,6 @@ server {
real_ip_header proxy_protocol; real_ip_header proxy_protocol;
root ${nginxStaticPath}; 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 / { location / {
} }
} }
@ -8098,6 +8078,8 @@ server {
default_type 'text/plain; charset=utf-8'; default_type 'text/plain; charset=utf-8';
alias /etc/v2ray-agent/subscribe/\$1/\$2; alias /etc/v2ray-agent/subscribe/\$1/\$2;
} }
location / {
}
} }
EOF EOF
bootStartup nginx bootStartup nginx
@ -8539,9 +8521,7 @@ initRandomSalt() {
# 订阅 # 订阅
subscribe() { subscribe() {
readInstallProtocolType readInstallProtocolType
if [[ "${coreInstallType}" == "1" ]] && [[ "${selectCustomInstallType}" == ",7," || "${currentInstallProtocolType}" == ",7,8," ]] || [[ "${coreInstallType}" == "2" ]]; then installSubscribe
installSubscribe
fi
readNginxSubscribe readNginxSubscribe
if [[ "${coreInstallType}" == "1" || "${coreInstallType}" == "2" ]]; then if [[ "${coreInstallType}" == "1" || "${coreInstallType}" == "2" ]]; then
@ -8830,9 +8810,9 @@ initRealityClientServersName() {
if [[ "${realityServerNameCurrentDomainStatus}" == "y" ]]; then if [[ "${realityServerNameCurrentDomainStatus}" == "y" ]]; then
realityServerName="${domain}" realityServerName="${domain}"
if [[ "${selectCoreType}" == "1" ]]; then if [[ "${selectCoreType}" == "1" ]]; then
if [[ -n "${port}" ]]; then # if [[ -n "${port}" ]]; then
realityDomainPort="${port}" # realityDomainPort="${port}"
elif [[ -z "${subscribePort}" ]]; then if [[ -z "${subscribePort}" ]]; then
echo echo
installSubscribe installSubscribe
readNginxSubscribe readNginxSubscribe
@ -9174,7 +9154,7 @@ menu() {
cd "$HOME" || exit cd "$HOME" || exit
echoContent red "\n==============================================================" echoContent red "\n=============================================================="
echoContent green "作者mack-a" echoContent green "作者mack-a"
echoContent green "当前版本v3.2.50" echoContent green "当前版本v3.2.51"
echoContent green "Githubhttps://github.com/mack-a/v2ray-agent" echoContent green "Githubhttps://github.com/mack-a/v2ray-agent"
echoContent green "描述:八合一共存脚本\c" echoContent green "描述:八合一共存脚本\c"
showInstallStatus showInstallStatus