feat(脚本): 修复nginx proxy_protocol 400报错问题、修改xray-core嗅探问题

pull/965/head
mack-a 2024-02-07 21:31:39 +08:00
parent 0607f1f764
commit 5b7e1585bc
1 changed files with 12 additions and 7 deletions

View File

@ -1433,8 +1433,12 @@ EOF
cat <<EOF >>${nginxConfigPath}alone.conf cat <<EOF >>${nginxConfigPath}alone.conf
server { server {
listen 127.0.0.1:31300; listen 127.0.0.1:31300 proxy_protocol;
server_name ${domain}; server_name ${domain};
set_real_ip_from 0.0.0.0/0;
real_ip_header proxy_protocol;
root ${nginxStaticPath}; root ${nginxStaticPath};
location ~ ^/s/(clashMeta|default|clashMetaProfiles)/(.*) { location ~ ^/s/(clashMeta|default|clashMetaProfiles)/(.*) {
proxy_set_header X-Real-IP \$proxy_protocol_addr; proxy_set_header X-Real-IP \$proxy_protocol_addr;
@ -3974,6 +3978,7 @@ EOF
elif [[ -z "$3" ]]; then elif [[ -z "$3" ]]; then
rm /etc/v2ray-agent/xray/conf/06_VLESS_gRPC_inbounds.json >/dev/null 2>&1 rm /etc/v2ray-agent/xray/conf/06_VLESS_gRPC_inbounds.json >/dev/null 2>&1
fi fi
# VLESS Vision # VLESS Vision
if echo "${selectCustomInstallType}" | grep -q ",0," || [[ "$1" == "all" ]]; then if echo "${selectCustomInstallType}" | grep -q ",0," || [[ "$1" == "all" ]]; then
@ -6193,12 +6198,12 @@ unInstallSniffing() {
installSniffing() { installSniffing() {
readInstallType readInstallType
if [[ "${coreInstallType}" == "1" ]]; then if [[ "${coreInstallType}" == "1" ]]; then
find ${configPath} -name "*inbounds.json*" | awk -F "[c][o][n][f][/]" '{print $2}' | while read -r inbound; do if [[ -f "${configPath}02_VLESS_TCP_inbounds.json" ]]; then
if ! grep -q "destOverride" <"${configPath}${inbound}"; then if ! grep -q "destOverride" <"${configPath}02_VLESS_TCP_inbounds.json"; then
sniffing=$(jq -r '.inbounds[0].sniffing = {"enabled":true,"destOverride":["http","tls","quic"]}' "${configPath}${inbound}") sniffing=$(jq -r '.inbounds[0].sniffing = {"enabled":true,"destOverride":["http","tls","quic"]}' "${configPath}02_VLESS_TCP_inbounds.json")
echo "${sniffing}" | jq . >"${configPath}${inbound}" echo "${sniffing}" | jq . >"${configPath}02_VLESS_TCP_inbounds.json"
fi fi
done fi
fi fi
} }
@ -8736,7 +8741,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.7" echoContent green "当前版本v3.2.8"
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