mirror of https://github.com/mack-a/v2ray-agent
feat(脚本): 增加服务状态展示、优化安装、重新安装选项
parent
0698e04856
commit
a702f13dba
62
install.sh
62
install.sh
|
@ -214,6 +214,55 @@ readConfigHostPathUUID() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# 状态展示
|
||||||
|
showInstallStatus() {
|
||||||
|
if [[ -n "${coreInstallType}" ]]; then
|
||||||
|
if [[ "${coreInstallType}" == 1 ]]; then
|
||||||
|
if [[ -n $(pgrep -f xray/xray) ]]; then
|
||||||
|
echoContent yellow "核心:Xray-core[运行中]"
|
||||||
|
else
|
||||||
|
echoContent yellow "核心:Xray-core[未运行]"
|
||||||
|
fi
|
||||||
|
|
||||||
|
elif [[ "${coreInstallType}" == 2 || "${coreInstallType}" == 3 ]]; then
|
||||||
|
if [[ -n $(pgrep -f v2ray/v2ray) ]]; then
|
||||||
|
echoContent yellow "核心:v2ray-core[运行中]"
|
||||||
|
else
|
||||||
|
echoContent yellow "核心:v2ray-core[未运行]"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# 读取协议类型
|
||||||
|
readInstallProtocolType
|
||||||
|
|
||||||
|
if [[ -n ${currentInstallProtocolType} ]]; then
|
||||||
|
echoContent yellow "已安装协议:\c"
|
||||||
|
fi
|
||||||
|
if echo ${currentInstallProtocolType} | grep -q 0; then
|
||||||
|
if [[ "${coreInstallType}" == 2 ]]; then
|
||||||
|
echoContent yellow "VLESS+TCP[TLS] \c"
|
||||||
|
else
|
||||||
|
echoContent yellow "VLESS+TCP[TLS/XTLS] \c"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if echo ${currentInstallProtocolType} | grep -q 1; then
|
||||||
|
echoContent yellow "VLESS+WS[TLS] \c"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if echo ${currentInstallProtocolType} | grep -q 2; then
|
||||||
|
echoContent yellow "VMess+TCP[TLS] \c"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if echo ${currentInstallProtocolType} | grep -q 3; then
|
||||||
|
echoContent yellow "VMess+WS[TLS] \c"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if echo ${currentInstallProtocolType} | grep -q 4; then
|
||||||
|
echoContent yellow "Trojan+TCP/WS[TLS]"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# 清理旧残留
|
# 清理旧残留
|
||||||
cleanUp() {
|
cleanUp() {
|
||||||
if [[ "$1" == "v2rayClean" ]]; then
|
if [[ "$1" == "v2rayClean" ]]; then
|
||||||
|
@ -2189,11 +2238,6 @@ showAccounts() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# 状态展示
|
|
||||||
#showInstallStatus() {
|
|
||||||
#
|
|
||||||
#}
|
|
||||||
|
|
||||||
# 更新伪装站
|
# 更新伪装站
|
||||||
updateNginxBlog() {
|
updateNginxBlog() {
|
||||||
echoContent skyBlue "\n进度 $1/${totalProgress} : 更换伪装站点"
|
echoContent skyBlue "\n进度 $1/${totalProgress} : 更换伪装站点"
|
||||||
|
@ -3516,11 +3560,17 @@ menu() {
|
||||||
cd "$HOME" || exit
|
cd "$HOME" || exit
|
||||||
echoContent red "\n=============================================================="
|
echoContent red "\n=============================================================="
|
||||||
echoContent green "作者:mack-a"
|
echoContent green "作者:mack-a"
|
||||||
echoContent green "当前版本:v2.4.6"
|
echoContent green "当前版本:v2.4.7"
|
||||||
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
|
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
|
||||||
echoContent green "描述:七合一共存脚本"
|
echoContent green "描述:七合一共存脚本"
|
||||||
|
showInstallStatus
|
||||||
echoContent red "=============================================================="
|
echoContent red "=============================================================="
|
||||||
|
if [[ -n "${coreInstallType}" ]]; then
|
||||||
|
echoContent yellow "1.重新安装"
|
||||||
|
else
|
||||||
echoContent yellow "1.安装"
|
echoContent yellow "1.安装"
|
||||||
|
fi
|
||||||
|
|
||||||
echoContent yellow "2.任意组合安装"
|
echoContent yellow "2.任意组合安装"
|
||||||
echoContent skyBlue "-------------------------工具管理-----------------------------"
|
echoContent skyBlue "-------------------------工具管理-----------------------------"
|
||||||
echoContent yellow "3.账号管理"
|
echoContent yellow "3.账号管理"
|
||||||
|
|
Loading…
Reference in New Issue