fix(脚本): 修复安装hy2&tuic报错问题、优化增减用户订阅更新

This commit is contained in:
mack-a
2025-11-29 17:59:14 +08:00
parent 5a8d6d4c1f
commit 8cfb11fb0a

View File

@@ -871,8 +871,8 @@ readConfigHostPathUUID() {
# reality
if echo ${currentInstallProtocolType} | grep -q ",7,"; then
currentClients=$(jq -r .inbounds[0].settings.clients ${configPath}07_VLESS_vision_reality_inbounds.json)
currentUUID=$(jq -r .inbounds[0].settings.clients[0].id ${configPath}07_VLESS_vision_reality_inbounds.json)
currentClients=$(jq -r .inbounds[1].settings.clients ${configPath}07_VLESS_vision_reality_inbounds.json)
currentUUID=$(jq -r .inbounds[1].settings.clients[0].id ${configPath}07_VLESS_vision_reality_inbounds.json)
xrayVLESSRealityVisionPort=$(jq -r .inbounds[0].port ${configPath}07_VLESS_vision_reality_inbounds.json)
if [[ "${currentPort}" == "${xrayVLESSRealityVisionPort}" ]]; then
xrayVLESSRealityVisionPort="${currentDefaultPort}"
@@ -2982,14 +2982,14 @@ initHysteria2Network() {
read -r -p "下行速度:" hysteria2ClientDownloadSpeed
if [[ -z "${hysteria2ClientDownloadSpeed}" ]]; then
hysteria2ClientDownloadSpeed=100
echoContent yellow "\n ---> 下行速度: ${hysteria2ClientDownloadSpeed}\n"
echoContent green "\n ---> 下行速度: ${hysteria2ClientDownloadSpeed}\n"
fi
echoContent yellow "请输入本地带宽峰值的上行速度默认50单位Mbps"
read -r -p "上行速度:" hysteria2ClientUploadSpeed
if [[ -z "${hysteria2ClientUploadSpeed}" ]]; then
hysteria2ClientUploadSpeed=50
echoContent yellow "\n ---> 上行速度: ${hysteria2ClientUploadSpeed}\n"
echoContent green "\n ---> 上行速度: ${hysteria2ClientUploadSpeed}\n"
fi
}
@@ -6103,7 +6103,10 @@ addUser() {
done
reloadCore
echoContent green " ---> 添加完成"
readNginxSubscribe
if [[ -n "${subscribePort}" ]]; then
subscribe false
fi
manageAccount 1
}
# 移除用户
@@ -6202,8 +6205,11 @@ removeUser() {
echo "${vmessHTTPUpgradeResult}" | jq . >${configPath}11_VMess_HTTPUpgrade_inbounds.json
fi
reloadCore
readNginxSubscribe
if [[ -n "${subscribePort}" ]]; then
subscribe false
fi
fi
manageAccount 1
}
# 更新脚本
@@ -9529,7 +9535,7 @@ menu() {
cd "$HOME" || exit
echoContent red "\n=============================================================="
echoContent green "作者mack-a"
echoContent green "当前版本v3.4.37"
echoContent green "当前版本v3.4.38"
echoContent green "Githubhttps://github.com/mack-a/v2ray-agent"
echoContent green "描述:八合一共存脚本\c"
showInstallStatus