From c38c0ef2ee8149bc3618ef95a4a9a4a0409c8724 Mon Sep 17 00:00:00 2001 From: mack-a Date: Tue, 3 May 2022 22:58:37 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=84=9A=E6=9C=AC):=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=AE=89=E8=A3=85=E5=8F=AA=E5=AE=89?= =?UTF-8?q?=E8=A3=85grpc=E4=BC=A0=E8=BE=93=E5=8D=8F=E8=AE=AE=E6=97=B6?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E8=AF=BB=E5=8F=96=E5=88=B0path=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 59e4c41..730325a 100644 --- a/install.sh +++ b/install.sh @@ -371,6 +371,17 @@ readConfigHostPathUUID() { elif [[ $(echo "${fallback}" | jq -r .dest) == 31299 ]]; then currentPath=$(echo "${path}" | awk -F "[v][w][s]" '{print $1}') fi + # 尝试读取alpn h2 Path + if [[ -z "${currentPath}" ]]; then + dest=$(jq -r -c '.inbounds[0].settings.fallbacks[]|select(.alpn)|.dest' ${configPath}${frontingType}.json | head -1) + if [[ "${dest}" == "31302" ]]; then + if grep -q "trojangrpc {" <${nginxConfigPath}alone.conf; then + currentPath=$(grep "trojangrpc {" <${nginxConfigPath}alone.conf | awk -F "[/]" '{print $2}' | awk -F "[t][r][o][j][a][n]" '{print $1}') + elif grep -q "grpc {" <${nginxConfigPath}alone.conf; then + currentPath=$(grep "grpc {" <${nginxConfigPath}alone.conf | head -1 | awk -F "[/]" '{print $2}' | awk -F "[g][r][p][c]" '{print $1}') + fi + fi + fi local defaultPortFile= defaultPortFile=$(find ${configPath}* | grep "default") @@ -514,7 +525,6 @@ mkdirTools() { # 安装工具包 installTools() { - echo '安装工具' echoContent skyBlue "\n进度 $1/${totalProgress} : 安装工具" # 修复ubuntu个别系统问题 if [[ "${release}" == "ubuntu" ]]; then @@ -4704,7 +4714,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v2.5.67" + echoContent green "当前版本:v2.5.68" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus