From 7745311fe86522d6f5baeb8a60bd98d0463fd412 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Fri, 22 Dec 2023 17:46:33 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E6=AD=A5=E9=AA=A4=E6=8F=90=E7=A4=BA=E3=80=81?= =?UTF-8?q?=E5=BD=93=E5=AE=89=E8=A3=85singbox=E6=97=B6=E9=9A=90=E8=97=8F?= =?UTF-8?q?=204=206=E7=9B=B8=E5=BA=94=E7=9A=84=E7=AE=A1=E7=90=86=E3=80=81?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E8=AE=A2=E9=98=85=E6=97=B6=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=BC=AA=E8=A3=85=E7=AB=99=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/install.sh b/install.sh index 9dda10b..5da70e0 100644 --- a/install.sh +++ b/install.sh @@ -1725,7 +1725,12 @@ randomPathFunction() { } # Nginx伪装博客 nginxBlog() { - echoContent skyBlue "\n进度 $1/${totalProgress} : 添加伪装站点" + if [[ -n "$1" ]]; then + echoContent skyBlue "\n进度 $1/${totalProgress} : 添加伪装站点" + else + echoContent yellow "\n开始添加伪装站点" + fi + if [[ -d "${nginxStaticPath}" && -f "${nginxStaticPath}/check" ]]; then echo read -r -p "检测到安装伪装站点,是否需要重新安装[y/n]:" nginxBlogInstallStatus @@ -3931,7 +3936,8 @@ initSingBoxConfig() { # VLESS Vision if echo "${selectCustomInstallType}" | grep -q 0 || [[ "$1" == "all" ]]; then - echoContent red "\n===================== 配置VLESS+Vision =====================\n" + echoContent yellow "\n===================== 配置VLESS+Vision =====================\n" + echoContent skyBlue "\n开始配置VLESS+Vision协议端口" echo mapfile -t result < <(initSingBoxPort "${singBoxVLESSVisionPort}") echoContent green "\n ---> VLESS_Vision端口:${result[-1]}" @@ -3966,10 +3972,12 @@ EOF # VLESS_Reality_Vision if echo "${selectCustomInstallType}" | grep -q 7 || [[ "$1" == "all" ]]; then - echoContent red "\n================= 配置VLESS+Reality+Vision =================\n" + echoContent yellow "\n================= 配置VLESS+Reality+Vision =================\n" initRealityClientServersName initRealityKey + echoContent skyBlue "\n开始配置VLESS+Reality+Vision协议端口" echo + mapfile -t result < <(initSingBoxPort "${singBoxVLESSRealityVisionPort}") echoContent green "\n ---> VLESS_Reality_Vision端口:${result[-1]}" cat </etc/v2ray-agent/sing-box/conf/config/07_VLESS_vision_reality_inbounds.json @@ -4006,9 +4014,10 @@ EOF fi if echo "${selectCustomInstallType}" | grep -q 8 || [[ "$1" == "all" ]]; then - echoContent red "\n================== 配置VLESS+Reality+gRPC ==================\n" + echoContent yellow "\n================== 配置VLESS+Reality+gRPC ==================\n" initRealityClientServersName initRealityKey + echoContent skyBlue "\n开始配置VLESS+Reality+gRPC协议端口" echo mapfile -t result < <(initSingBoxPort "${singBoxVLESSRealityGRPCPort}") echoContent green "\n ---> VLESS_Reality_gPRC端口:${result[-1]}" @@ -4050,7 +4059,8 @@ EOF fi if echo "${selectCustomInstallType}" | grep -q 6 || [[ "$1" == "all" ]]; then - echoContent red "\n================== 配置 Hysteria2 ==================\n" + echoContent yellow "\n================== 配置 Hysteria2 ==================\n" + echoContent skyBlue "\n开始配置Hysteria2协议端口" echo mapfile -t result < <(initSingBoxPort "${singBoxHysteria2Port}") echoContent green "\n ---> Hysteria2端口:${result[-1]}" @@ -4083,7 +4093,8 @@ EOF fi if echo "${selectCustomInstallType}" | grep -q 9 || [[ "$1" == "all" ]]; then - echoContent red "\n==================== 配置 Tuic =====================\n" + echoContent yellow "\n==================== 配置 Tuic =====================\n" + echoContent skyBlue "\n开始配置Tuic协议端口" echo mapfile -t result < <(initSingBoxPort "${singBoxTuicPort}") echoContent green "\n ---> Tuic端口:${result[-1]}" @@ -7167,9 +7178,11 @@ installSubscribe() { if [[ "${coreInstallType}" == "2" || "${selectCoreType}" == "2" ]] && [[ -z "${subscribePort}" ]]; then nginxVersion=$(nginx -v 2>&1) - echoContent yellow " ---> 配置订阅中\n" + echoContent yellow "开始配置订阅,请输入订阅的端口\n" mapfile -t result < <(initSingBoxPort "${subscribePort}") + echoContent yellow " ---> 开始配置订阅的伪装站点\n" + nginxBlog if ( ([[ -n "${selectCustomInstallType}" ]] && ! echo "${selectCustomInstallType}" | grep -q -E "0|1|2|3|4|5|6|9") || ([[ -n "${currentInstallProtocolType}" ]] && ! echo "${currentInstallProtocolType}" | grep -q -E "0|1|2|3|4|5|6|9")) && [[ "${selectInstallType}" == "2" || "${coreInstallType}" == "2" ]]; then echoContent green "未发现tls证书,使用无加密订阅,可能被运营商拦截。请注意风险" @@ -7671,6 +7684,7 @@ subscribe() { readInstallProtocolType installSubscribe + readNginxSubscribe if [[ "${coreInstallType}" == "1" || "${coreInstallType}" == "2" ]]; then @@ -7860,7 +7874,7 @@ switchAlpn() { # 初始化realityKey initRealityKey() { - echoContent skyBlue "\n========================= 生成key ==========================\n" + echoContent skyBlue "\n生成Reality key\n" if [[ -n "${currentRealityPublicKey}" ]]; then read -r -p "读取到上次安装记录,是否使用上次安装时的PublicKey/PrivateKey ?[y/n]:" historyKeyStatus if [[ "${historyKeyStatus}" == "y" ]]; then @@ -8269,7 +8283,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v3.1.13" + echoContent green "当前版本:v3.1.14" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus @@ -8286,9 +8300,12 @@ menu() { fi echoContent yellow "2.任意组合安装" - echoContent yellow "4.Hysteria2管理" - # echoContent yellow "5.REALITY管理" - echoContent yellow "6.Tuic管理" + if [[ "${coreInstallType}" != "2" ]]; then + echoContent yellow "4.Hysteria2管理" + # echoContent yellow "5.REALITY管理" + echoContent yellow "6.Tuic管理" + fi + echoContent skyBlue "-------------------------工具管理-----------------------------" echoContent yellow "7.账号管理" echoContent yellow "8.更换伪装站"