feat(脚本): 添加80端口提示、添加hysteria和reality端口随机提示

pull/656/head
mack-a 2023-04-17 11:10:38 +08:00
parent f865e312bc
commit 84c4a233cd
1 changed files with 15 additions and 8 deletions

View File

@ -1361,7 +1361,8 @@ customPortFunction() {
else else
# todo dns api # todo dns api
wildcardDomainStatus=true wildcardDomainStatus=true
echoContent red "未检测到80端口开放无法安装只可使用dns api方式安装 todo" echoContent red "未检测到80端口开放无法安装后续会支持DNS API [TODO]"
echoContent yellow "检查域名解析可以通过ping排查"
exit 0 exit 0
fi fi
fi fi
@ -2409,8 +2410,11 @@ initHysteriaPort() {
fi fi
if [[ -z "${hysteriaPort}" ]]; then if [[ -z "${hysteriaPort}" ]]; then
echoContent yellow "请输入Hysteria端口[例: 10000],不可与其他服务重复" echoContent yellow "请输入Hysteria端口[回车随机10000-60000],不可与其他服务重复"
read -r -p "端口:" hysteriaPort read -r -p "端口:" hysteriaPort
if [[ -z "${hysteriaPort}" ]]; then
hysteriaPort=$((RANDOM % 50001 + 10000))
fi
fi fi
if [[ -z ${hysteriaPort} ]]; then if [[ -z ${hysteriaPort} ]]; then
echoContent red " ---> 端口不可为空" echoContent red " ---> 端口不可为空"
@ -5996,14 +6000,17 @@ initRealityPort() {
# todo 读取到VLESS_TLS_Vision端口提示是否使用使用。这里可能有歧义 # todo 读取到VLESS_TLS_Vision端口提示是否使用使用。这里可能有歧义
if [[ -z "${realityPort}" ]]; then if [[ -z "${realityPort}" ]]; then
if [[ -n "${port}" ]]; then if [[ -n "${port}" ]]; then
echoContent yellow "请输入端口[回车默认使用TLS+Vision端口]" read -r -p "是否使用TLS+Vision端口 [y/n]:" realityPortTLSVisionStatus
read -r -p "端口:" realityPort if [[ "${realityPortTLSVisionStatus}" == "y" ]]; then
if [[ -z "${realityPort}" ]]; then
realityPort=${port} realityPort=${port}
fi fi
else fi
echoContent yellow "请输入端口" if [[ -z "${realityPort}" ]]; then
echoContent yellow "请输入端口[回车随机10000-60000]"
read -r -p "端口:" realityPort read -r -p "端口:" realityPort
if [[ -z "${realityPort}" ]]; then
realityPort=$((RANDOM % 50001 + 10000))
fi
fi fi
if [[ -n "${realityPort}" && "${currentRealityPort}" == "${realityPort}" ]]; then if [[ -n "${realityPort}" && "${currentRealityPort}" == "${realityPort}" ]]; then
handleXray stop handleXray stop
@ -6138,7 +6145,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.8.3" echoContent green "当前版本v2.8.4"
echoContent green "Githubhttps://github.com/mack-a/v2ray-agent" echoContent green "Githubhttps://github.com/mack-a/v2ray-agent"
echoContent green "描述:八合一共存脚本\c" echoContent green "描述:八合一共存脚本\c"
showInstallStatus showInstallStatus