diff --git a/install.sh b/install.sh index fb4c4c2..4704740 100644 --- a/install.sh +++ b/install.sh @@ -266,6 +266,9 @@ readConfigHostPathUUID() { currentHost=$(jq -r .inbounds[0].streamSettings.xtlsSettings.certificates[0].certificateFile ${configPath}02_VLESS_TCP_inbounds.json | awk -F '[t][l][s][/]' '{print $2}' | awk -F '[.][c][r][t]' '{print $1}') currentUUID=$(jq -r .inbounds[0].settings.clients[0].id ${configPath}02_VLESS_TCP_inbounds.json) currentAdd=$(jq -r .inbounds[0].settings.clients[0].add ${configPath}02_VLESS_TCP_inbounds.json) + if [[ "${currentAdd}" == "null" ]];then + currentAdd=${currentHost} + fi currentPort=$(jq .inbounds[0].port ${configPath}02_VLESS_TCP_inbounds.json) elif [[ "${coreInstallType}" == "2" || "${coreInstallType}" == "3" ]]; then @@ -275,6 +278,10 @@ readConfigHostPathUUID() { currentHost=$(jq -r .inbounds[0].streamSettings.tlsSettings.certificates[0].certificateFile ${configPath}02_VLESS_TCP_inbounds.json | awk -F '[t][l][s][/]' '{print $2}' | awk -F '[.][c][r][t]' '{print $1}') fi currentAdd=$(jq -r .inbounds[0].settings.clients[0].add ${configPath}02_VLESS_TCP_inbounds.json) + + if [[ "${currentAdd}" == "null" ]];then + currentAdd=${currentHost} + fi currentUUID=$(jq -r .inbounds[0].settings.clients[0].id ${configPath}02_VLESS_TCP_inbounds.json) currentPort=$(jq .inbounds[0].port ${configPath}02_VLESS_TCP_inbounds.json) fi @@ -2256,7 +2263,7 @@ EOF VLESSEmail=$(echo "${ps}" | awk -F "[\"]" '{print $2}') echoContent yellow " ---> 通用格式(VLESS+gRPC+TLS)" - echoContent green " vless://${VLESSID}@${add}:${port}?encryption=none&security=tls&type=grpc&host=${host}&path=${path}#${VLESSEmail}\n" + echoContent green " vless://${VLESSID}@${add}:${port}?encryption=none&security=tls&type=grpc&host=${host}&serviceName=${path}#${VLESSEmail}\n" echoContent yellow " ---> 格式化明文(VLESS+gRPC+TLS)" echoContent green " 协议类型:VLESS,地址:${add},伪装域名/SNI:${host},端口:${port},用户ID:${VLESSID},安全:tls,传输方式:gRPC,serviceName:${path},账户名:${VLESSEmail}\n" @@ -2362,6 +2369,7 @@ showAccounts() { defaultBase64Code vmessws $(echo "${user}" | jq .email) $(echo "${user}" | jq .id) "${currentHost}:${currentPort}" ${path} ${currentAdd} done fi + # VLESS grpc if echo ${currentInstallProtocolType} | grep -q 5 || [[ -z "${currentInstallProtocolType}" ]]; then echoContent skyBlue "\n=============================== VLESS gRPC TLS CDN ===============================\n"