mirror of https://github.com/mack-a/v2ray-agent
fix(脚本): 修复gRPC添加、删除账户时无法生效的问题
parent
9d3c2b7768
commit
caaa2c971f
16
install.sh
16
install.sh
|
@ -2778,6 +2778,14 @@ addUser() {
|
||||||
echo "${vmessWsResult}" | jq . >${configPath}05_VMess_WS_inbounds.json
|
echo "${vmessWsResult}" | jq . >${configPath}05_VMess_WS_inbounds.json
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if echo ${currentInstallProtocolType} | grep -q 5; then
|
||||||
|
local vmessUsers="${users//\"flow\":\"xtls-rprx-direct\"\,/}"
|
||||||
|
|
||||||
|
local vlessGRPCResult
|
||||||
|
vlessGRPCResult=$(jq -r '.inbounds[0].settings.clients += ['${vmessUsers}']' ${configPath}06_VLESS_gRPC_inbounds.json)
|
||||||
|
echo "${vlessGRPCResult}" | jq . >${configPath}06_VLESS_gRPC_inbounds.json
|
||||||
|
fi
|
||||||
|
|
||||||
if echo ${currentInstallProtocolType} | grep -q 4; then
|
if echo ${currentInstallProtocolType} | grep -q 4; then
|
||||||
local trojanResult
|
local trojanResult
|
||||||
trojanResult=$(jq -r '.password += ['${trojanGoUsers}']' ${configPath}../../trojan/config_full.json)
|
trojanResult=$(jq -r '.password += ['${trojanGoUsers}']' ${configPath}../../trojan/config_full.json)
|
||||||
|
@ -2825,6 +2833,12 @@ removeUser() {
|
||||||
echo "${vmessWSResult}" | jq . >${configPath}05_VMess_WS_inbounds.json
|
echo "${vmessWSResult}" | jq . >${configPath}05_VMess_WS_inbounds.json
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if echo ${currentInstallProtocolType} | grep -q 5; then
|
||||||
|
local vlessGRPCResult
|
||||||
|
vlessGRPCResult=$(jq -r 'del(.inbounds[0].settings.clients['${delUserIndex}'])' ${configPath}06_VLESS_gRPC_inbounds.json)
|
||||||
|
echo "${vlessGRPCResult}" | jq . >${configPath}06_VLESS_gRPC_inbounds.json
|
||||||
|
fi
|
||||||
|
|
||||||
if echo ${currentInstallProtocolType} | grep -q 4; then
|
if echo ${currentInstallProtocolType} | grep -q 4; then
|
||||||
local trojanResult
|
local trojanResult
|
||||||
trojanResult=$(jq -r 'del(.password['${delUserIndex}'])' ${configPath}../../trojan/config_full.json)
|
trojanResult=$(jq -r 'del(.password['${delUserIndex}'])' ${configPath}../../trojan/config_full.json)
|
||||||
|
@ -3765,7 +3779,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.38"
|
echoContent green "当前版本:v2.4.39"
|
||||||
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
|
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
|
||||||
echoContent green "描述:八合一共存脚本\c"
|
echoContent green "描述:八合一共存脚本\c"
|
||||||
showInstallStatus
|
showInstallStatus
|
||||||
|
|
Loading…
Reference in New Issue