Skip to content

Commit 8cfb11f

Browse files
committed
fix(脚本): 修复安装hy2&tuic报错问题、优化增减用户订阅更新
1 parent 5a8d6d4 commit 8cfb11f

1 file changed

Lines changed: 15 additions & 9 deletions

File tree

install.sh

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ initVar() {
127127
removeType='yum -y remove'
128128
upgrade="yum -y update"
129129
echoType='echo -e'
130-
# sudoCMD=""
130+
# sudoCMD=""
131131

132132
# 核心支持的cpu版本
133133
xrayCoreCPUVendor=""
@@ -871,8 +871,8 @@ readConfigHostPathUUID() {
871871
# reality
872872
if echo ${currentInstallProtocolType} | grep -q ",7,"; then
873873

874-
currentClients=$(jq -r .inbounds[0].settings.clients ${configPath}07_VLESS_vision_reality_inbounds.json)
875-
currentUUID=$(jq -r .inbounds[0].settings.clients[0].id ${configPath}07_VLESS_vision_reality_inbounds.json)
874+
currentClients=$(jq -r .inbounds[1].settings.clients ${configPath}07_VLESS_vision_reality_inbounds.json)
875+
currentUUID=$(jq -r .inbounds[1].settings.clients[0].id ${configPath}07_VLESS_vision_reality_inbounds.json)
876876
xrayVLESSRealityVisionPort=$(jq -r .inbounds[0].port ${configPath}07_VLESS_vision_reality_inbounds.json)
877877
if [[ "${currentPort}" == "${xrayVLESSRealityVisionPort}" ]]; then
878878
xrayVLESSRealityVisionPort="${currentDefaultPort}"
@@ -1073,7 +1073,7 @@ mkdirTools() {
10731073
# 检测root
10741074
checkRoot() {
10751075
if [ "$(id -u)" -ne 0 ]; then
1076-
# sudoCMD="sudo"
1076+
# sudoCMD="sudo"
10771077
echo "检测到非 Root 用户,将使用 sudo 执行命令..."
10781078
fi
10791079
}
@@ -2982,14 +2982,14 @@ initHysteria2Network() {
29822982
read -r -p "下行速度:" hysteria2ClientDownloadSpeed
29832983
if [[ -z "${hysteria2ClientDownloadSpeed}" ]]; then
29842984
hysteria2ClientDownloadSpeed=100
2985-
echoContent yellow "\n ---> 下行速度: ${hysteria2ClientDownloadSpeed}\n"
2985+
echoContent green "\n ---> 下行速度: ${hysteria2ClientDownloadSpeed}\n"
29862986
fi
29872987

29882988
echoContent yellow "请输入本地带宽峰值的上行速度(默认:50,单位:Mbps)"
29892989
read -r -p "上行速度:" hysteria2ClientUploadSpeed
29902990
if [[ -z "${hysteria2ClientUploadSpeed}" ]]; then
29912991
hysteria2ClientUploadSpeed=50
2992-
echoContent yellow "\n ---> 上行速度: ${hysteria2ClientUploadSpeed}\n"
2992+
echoContent green "\n ---> 上行速度: ${hysteria2ClientUploadSpeed}\n"
29932993
fi
29942994
}
29952995

@@ -6103,7 +6103,10 @@ addUser() {
61036103
done
61046104
reloadCore
61056105
echoContent green " ---> 添加完成"
6106-
subscribe false
6106+
readNginxSubscribe
6107+
if [[ -n "${subscribePort}" ]]; then
6108+
subscribe false
6109+
fi
61076110
manageAccount 1
61086111
}
61096112
# 移除用户
@@ -6202,7 +6205,10 @@ removeUser() {
62026205
echo "${vmessHTTPUpgradeResult}" | jq . >${configPath}11_VMess_HTTPUpgrade_inbounds.json
62036206
fi
62046207
reloadCore
6205-
subscribe false
6208+
readNginxSubscribe
6209+
if [[ -n "${subscribePort}" ]]; then
6210+
subscribe false
6211+
fi
62066212
fi
62076213
manageAccount 1
62086214
}
@@ -9529,7 +9535,7 @@ menu() {
95299535
cd "$HOME" || exit
95309536
echoContent red "\n=============================================================="
95319537
echoContent green "作者:mack-a"
9532-
echoContent green "当前版本:v3.4.37"
9538+
echoContent green "当前版本:v3.4.38"
95339539
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
95349540
echoContent green "描述:八合一共存脚本\c"
95359541
showInstallStatus

0 commit comments

Comments
 (0)