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;
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 "Githubhttps://github.com/mack-a/v2ray-agent"
echoContent green "描述:八合一共存脚本\c"
showInstallStatus