mirror of https://github.com/mack-a/v2ray-agent
feat(脚本): 修改hysteria v2rayN配置、优化clashmeta配置、兼容nginx高版本h2配置
parent
b07c96f4a9
commit
745497e9a0
59
install.sh
59
install.sh
|
@ -1178,11 +1178,16 @@ updateRedirectNginxConf() {
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if echo "${selectCustomInstallType}" | grep -q 2 && echo "${selectCustomInstallType}" | grep -q 5 || [[ -z "${selectCustomInstallType}" ]]; then
|
if echo "${selectCustomInstallType}" | grep -q 2 && echo "${selectCustomInstallType}" | grep -q 5 || [[ -z "${selectCustomInstallType}" ]]; then
|
||||||
|
local nginxH2Conf=
|
||||||
|
nginxH2Conf="listen 127.0.0.1:31302 http2 so_keepalive=on;"
|
||||||
|
nginxVersion=$(nginx -v 2>&1)
|
||||||
|
|
||||||
|
if echo "${nginxVersion}" | grep -q "1.25"; then
|
||||||
|
nginxH2Conf="listen 127.0.0.1:31302 so_keepalive=on;http2 on;"
|
||||||
|
fi
|
||||||
cat <<EOF >>${nginxConfigPath}alone.conf
|
cat <<EOF >>${nginxConfigPath}alone.conf
|
||||||
server {
|
server {
|
||||||
listen 127.0.0.1:31302 so_keepalive=on;
|
${nginxH2Conf}
|
||||||
http2 on;
|
|
||||||
server_name ${domain};
|
server_name ${domain};
|
||||||
root ${nginxStaticPath};
|
root ${nginxStaticPath};
|
||||||
|
|
||||||
|
@ -4043,28 +4048,30 @@ EOF
|
||||||
echoContent yellow " ---> v2rayN(hysteria+TLS)"
|
echoContent yellow " ---> v2rayN(hysteria+TLS)"
|
||||||
cat <<EOF >"/etc/v2ray-agent/hysteria/conf/client.json"
|
cat <<EOF >"/etc/v2ray-agent/hysteria/conf/client.json"
|
||||||
{
|
{
|
||||||
server: "${currentHost}:34356",
|
"server": "${currentHost}:${hysteriaPort}",
|
||||||
protocol: "${hysteriaProtocol}",
|
"protocol": "${hysteriaProtocol}",
|
||||||
up_mbps: "${hysteriaClientUploadSpeed}"
|
"up_mbps": ${hysteriaClientUploadSpeed},
|
||||||
down_mbps: "${hysteriaClientDownloadSpeed}"
|
"down_mbps": ${hysteriaClientDownloadSpeed},
|
||||||
http: { listen: "127.0.0.1:10809", timeout: 300, disable_udp: false },
|
"http": { "listen": "127.0.0.1:10809", "timeout": 300, "disable_udp": false },
|
||||||
socks5: { listen: "127.0.0.1:10808", timeout: 300, disable_udp: false },
|
"socks5": { "listen": "127.0.0.1:10808", "timeout": 300, "disable_udp": false },
|
||||||
alpn: "h3",
|
"obfs": "",
|
||||||
acl: "acl/routes.acl",
|
"auth_str":"${id}",
|
||||||
mmdb: "acl/Country.mmdb",
|
"alpn": "h3",
|
||||||
server_name: "${currentHost}",
|
"acl": "acl/routes.acl",
|
||||||
insecure: false,
|
"mmdb": "acl/Country.mmdb",
|
||||||
recv_window_conn: 5767168,
|
"server_name": "${currentHost}",
|
||||||
recv_window: 23068672,
|
"insecure": false,
|
||||||
disable_mtu_discovery: true,
|
"recv_window_conn": 5767168,
|
||||||
resolver: "https://223.5.5.5/dns-query",
|
"recv_window": 23068672,
|
||||||
retry: 3,
|
"disable_mtu_discovery": true,
|
||||||
retry_interval: 3,
|
"resolver": "https://223.5.5.5/dns-query",
|
||||||
quit_on_disconnect: false,
|
"retry": 3,
|
||||||
handshake_timeout: 15,
|
"retry_interval": 3,
|
||||||
idle_timeout: 30,
|
"quit_on_disconnect": false,
|
||||||
fast_open: true,
|
"handshake_timeout": 15,
|
||||||
hop_interval: 120
|
"idle_timeout": 30,
|
||||||
|
"fast_open": true,
|
||||||
|
"hop_interval": 120
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
local v2rayNConf=
|
local v2rayNConf=
|
||||||
|
@ -7337,7 +7344,7 @@ rules:
|
||||||
- RULE-SET,ChinaMaxDomain,本地直连
|
- RULE-SET,ChinaMaxDomain,本地直连
|
||||||
- RULE-SET,ChinaMaxIPNoIPv6,本地直连,no-resolve
|
- RULE-SET,ChinaMaxIPNoIPv6,本地直连,no-resolve
|
||||||
- RULE-SET,lan,本地直连,no-resolve
|
- RULE-SET,lan,本地直连,no-resolve
|
||||||
- GEOIP,CN,本地直连,no-resolve
|
- GEOIP,CN,本地直连
|
||||||
- MATCH,漏网之鱼
|
- MATCH,漏网之鱼
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
@ -7784,7 +7791,7 @@ menu() {
|
||||||
cd "$HOME" || exit
|
cd "$HOME" || exit
|
||||||
echoContent red "\n=============================================================="
|
echoContent red "\n=============================================================="
|
||||||
echoContent green "作者:mack-a"
|
echoContent green "作者:mack-a"
|
||||||
echoContent green "当前版本:v2.9.21"
|
echoContent green "当前版本:v2.9.22"
|
||||||
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
|
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
|
||||||
echoContent green "描述:八合一共存脚本\c"
|
echoContent green "描述:八合一共存脚本\c"
|
||||||
showInstallStatus
|
showInstallStatus
|
||||||
|
|
Loading…
Reference in New Issue