mirror of https://github.com/mack-a/v2ray-agent
feat(脚本): 添加修改端口功能、优化代码
parent
3897ef82ba
commit
4d40b293d8
36
install.sh
36
install.sh
|
@ -2270,6 +2270,15 @@ updateNginxBlog() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# 更换端口
|
||||||
|
changeCorePort(){
|
||||||
|
read -r -p "请输入要更换的端口号:" newPort
|
||||||
|
if [[ -n "${newPort}" ]]; then
|
||||||
|
vlessTcpResult=$(jq -r ".inbounds[0].port=${newPort}" ${configPath}/02_VLESS_TCP_inbounds.json)
|
||||||
|
echo "${vlessTcpResult}" | jq . >${configPath}02_VLESS_TCP_inbounds.json
|
||||||
|
reloadCore
|
||||||
|
fi
|
||||||
|
}
|
||||||
# 卸载脚本
|
# 卸载脚本
|
||||||
unInstall() {
|
unInstall() {
|
||||||
read -r -p "是否确认卸载安装内容?[y/n]:" unInstallStatus
|
read -r -p "是否确认卸载安装内容?[y/n]:" unInstallStatus
|
||||||
|
@ -3098,14 +3107,8 @@ setUnlockDNS() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
if [[ "${coreInstallType}" == "1" ]]; then
|
reloadCore
|
||||||
handleXray stop
|
|
||||||
handleXray start
|
|
||||||
|
|
||||||
elif [[ "${coreInstallType}" == "2" || "${coreInstallType}" == "3" ]]; then
|
|
||||||
handleV2Ray stop
|
|
||||||
handleV2Ray start
|
|
||||||
fi
|
|
||||||
echoContent green "\n ---> DNS解锁添加成功,该设置对Trojan-Go无效"
|
echoContent green "\n ---> DNS解锁添加成功,该设置对Trojan-Go无效"
|
||||||
echoContent yellow "\n ---> 如还无法观看可以尝试以下两种方案"
|
echoContent yellow "\n ---> 如还无法观看可以尝试以下两种方案"
|
||||||
echoContent yellow " 1.重启vps"
|
echoContent yellow " 1.重启vps"
|
||||||
|
@ -3127,14 +3130,7 @@ removeUnlockDNS() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
if [[ "${coreInstallType}" == "1" ]]; then
|
reloadCore
|
||||||
handleXray stop
|
|
||||||
handleXray start
|
|
||||||
|
|
||||||
elif [[ "${coreInstallType}" == "2" || "${coreInstallType}" == "3" ]]; then
|
|
||||||
handleV2Ray stop
|
|
||||||
handleV2Ray start
|
|
||||||
fi
|
|
||||||
|
|
||||||
echoContent green " ---> 卸载成功"
|
echoContent green " ---> 卸载成功"
|
||||||
|
|
||||||
|
@ -3560,7 +3556,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.4.8"
|
echoContent green "当前版本:v2.4.9"
|
||||||
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
|
showInstallStatus
|
||||||
|
@ -3579,7 +3575,7 @@ menu() {
|
||||||
echoContent yellow "6.更换CDN节点"
|
echoContent yellow "6.更换CDN节点"
|
||||||
echoContent yellow "7.ipv6人机验证"
|
echoContent yellow "7.ipv6人机验证"
|
||||||
echoContent yellow "8.流媒体工具"
|
echoContent yellow "8.流媒体工具"
|
||||||
echoContent yellow "9.设置MTPROTO[废弃]"
|
echoContent yellow "9.更换端口"
|
||||||
echoContent skyBlue "-------------------------版本管理-----------------------------"
|
echoContent skyBlue "-------------------------版本管理-----------------------------"
|
||||||
echoContent yellow "10.core版本管理"
|
echoContent yellow "10.core版本管理"
|
||||||
echoContent yellow "11.更新Trojan-Go"
|
echoContent yellow "11.更新Trojan-Go"
|
||||||
|
@ -3617,9 +3613,9 @@ menu() {
|
||||||
8)
|
8)
|
||||||
streamingToolbox 1
|
streamingToolbox 1
|
||||||
;;
|
;;
|
||||||
# 9)
|
9)
|
||||||
# setMTG 1
|
changeCorePort 1
|
||||||
# ;;
|
;;
|
||||||
10)
|
10)
|
||||||
coreVersionManageMenu 1
|
coreVersionManageMenu 1
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue