From 84c4a233cd675094d4c2f42346b53b56127671c0 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Mon, 17 Apr 2023 11:10:38 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E6=B7=BB=E5=8A=A08?= =?UTF-8?q?0=E7=AB=AF=E5=8F=A3=E6=8F=90=E7=A4=BA=E3=80=81=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0hysteria=E5=92=8Creality=E7=AB=AF=E5=8F=A3=E9=9A=8F?= =?UTF-8?q?=E6=9C=BA=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/install.sh b/install.sh index 0468ecd..1ac051e 100644 --- a/install.sh +++ b/install.sh @@ -1361,7 +1361,8 @@ customPortFunction() { else # todo dns api wildcardDomainStatus=true - echoContent red "未检测到80端口开放,无法安装,只可使用dns api方式安装 todo" + echoContent red "未检测到80端口开放,无法安装,后续会支持DNS API [TODO]" + echoContent yellow "检查域名解析,可以通过ping排查" exit 0 fi fi @@ -2409,8 +2410,11 @@ initHysteriaPort() { fi if [[ -z "${hysteriaPort}" ]]; then - echoContent yellow "请输入Hysteria端口[例: 10000],不可与其他服务重复" + echoContent yellow "请输入Hysteria端口[回车随机10000-60000],不可与其他服务重复" read -r -p "端口:" hysteriaPort + if [[ -z "${hysteriaPort}" ]]; then + hysteriaPort=$((RANDOM % 50001 + 10000)) + fi fi if [[ -z ${hysteriaPort} ]]; then echoContent red " ---> 端口不可为空" @@ -5996,14 +6000,17 @@ initRealityPort() { # todo 读取到VLESS_TLS_Vision端口,提示是否使用使用。这里可能有歧义 if [[ -z "${realityPort}" ]]; then if [[ -n "${port}" ]]; then - echoContent yellow "请输入端口[回车默认使用TLS+Vision端口]" - read -r -p "端口:" realityPort - if [[ -z "${realityPort}" ]]; then + read -r -p "是否使用TLS+Vision端口 ?[y/n]:" realityPortTLSVisionStatus + if [[ "${realityPortTLSVisionStatus}" == "y" ]]; then realityPort=${port} fi - else - echoContent yellow "请输入端口" + fi + if [[ -z "${realityPort}" ]]; then + echoContent yellow "请输入端口[回车随机10000-60000]" read -r -p "端口:" realityPort + if [[ -z "${realityPort}" ]]; then + realityPort=$((RANDOM % 50001 + 10000)) + fi fi if [[ -n "${realityPort}" && "${currentRealityPort}" == "${realityPort}" ]]; then handleXray stop @@ -6138,7 +6145,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v2.8.3" + echoContent green "当前版本:v2.8.4" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus