mirror of https://github.com/mack-a/v2ray-agent
fix(脚本): 修复添加账号无法对vision添加的问题、修复卸载socks5分流后无法正常使用问题、添加查看socks5分流规则时展示账号信息
parent
2b76bb7fb1
commit
5960e10a6a
53
install.sh
53
install.sh
|
@ -4262,6 +4262,7 @@ EOF
|
||||||
installSniffing
|
installSniffing
|
||||||
removeXrayOutbound IPv4_out
|
removeXrayOutbound IPv4_out
|
||||||
removeXrayOutbound IPv6_out
|
removeXrayOutbound IPv6_out
|
||||||
|
removeXrayOutbound socks5_outbound
|
||||||
removeXrayOutbound blackhole_out
|
removeXrayOutbound blackhole_out
|
||||||
removeXrayOutbound wireguard_out_IPv6
|
removeXrayOutbound wireguard_out_IPv6
|
||||||
removeXrayOutbound wireguard_out_IPv4
|
removeXrayOutbound wireguard_out_IPv4
|
||||||
|
@ -5723,8 +5724,8 @@ addUser() {
|
||||||
elif [[ "${coreInstallType}" == "2" ]]; then
|
elif [[ "${coreInstallType}" == "2" ]]; then
|
||||||
clients=$(initSingBoxClients 0 "${uuid}" "${email}")
|
clients=$(initSingBoxClients 0 "${uuid}" "${email}")
|
||||||
fi
|
fi
|
||||||
clients=$(jq -r "${userConfig} = ${clients}" ${configPath}${frontingType}.json)
|
clients=$(jq -r "${userConfig} = ${clients}" ${configPath}02_VLESS_TCP_inbounds.json)
|
||||||
echo "${clients}" | jq . >${configPath}${frontingType}.json
|
echo "${clients}" | jq . >${configPath}02_VLESS_TCP_inbounds.json
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# VLESS WS
|
# VLESS WS
|
||||||
|
@ -6998,8 +6999,12 @@ showSingBoxRoutingRules() {
|
||||||
jq .route.rules "${singBoxConfigPath}$1.json"
|
jq .route.rules "${singBoxConfigPath}$1.json"
|
||||||
elif [[ "$1" == "socks5_outbound_route" && -f "${singBoxConfigPath}socks5_outbound.json" ]]; then
|
elif [[ "$1" == "socks5_outbound_route" && -f "${singBoxConfigPath}socks5_outbound.json" ]]; then
|
||||||
echoContent yellow "已安装 sing-box socks5全局出站分流"
|
echoContent yellow "已安装 sing-box socks5全局出站分流"
|
||||||
|
echoContent yellow "\n出站分流配置:"
|
||||||
|
echoContent skyBlue "$(jq .outbounds[0] ${singBoxConfigPath}socks5_outbound.json)"
|
||||||
elif [[ "$1" == "socks5_inbound_route" && -f "${singBoxConfigPath}20_socks5_inbounds.json" ]]; then
|
elif [[ "$1" == "socks5_inbound_route" && -f "${singBoxConfigPath}20_socks5_inbounds.json" ]]; then
|
||||||
echoContent yellow "已安装 sing-box socks5全局入站分流"
|
echoContent yellow "已安装 sing-box socks5全局入站分流"
|
||||||
|
echoContent yellow "\n出站分流配置:"
|
||||||
|
echoContent skyBlue "$(jq .outbounds[0] ${singBoxConfigPath}socks5_outbound.json)"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -7009,8 +7014,15 @@ showXrayRoutingRules() {
|
||||||
if [[ "${coreInstallType}" == "1" ]]; then
|
if [[ "${coreInstallType}" == "1" ]]; then
|
||||||
if [[ -f "${configPath}09_routing.json" ]]; then
|
if [[ -f "${configPath}09_routing.json" ]]; then
|
||||||
jq ".routing.rules[]|select(.outboundTag==\"$1\")" "${configPath}09_routing.json"
|
jq ".routing.rules[]|select(.outboundTag==\"$1\")" "${configPath}09_routing.json"
|
||||||
|
|
||||||
|
echoContent yellow "\n已安装 xray-core socks5全局出站分流"
|
||||||
|
echoContent yellow "\n出站分流配置:"
|
||||||
|
echoContent skyBlue "$(jq .outbounds[0].settings.servers[0] ${configPath}socks5_outbound.json)"
|
||||||
|
|
||||||
elif [[ "$1" == "socks5_outbound" && -f "${configPath}socks5_outbound.json" ]]; then
|
elif [[ "$1" == "socks5_outbound" && -f "${configPath}socks5_outbound.json" ]]; then
|
||||||
echoContent yellow "\n已安装 sing-box socks5全局出站分流"
|
echoContent yellow "\n已安装 xray-core socks5全局出站分流"
|
||||||
|
echoContent yellow "\n出站分流配置:"
|
||||||
|
echoContent skyBlue "$(jq .outbounds[0].settings.servers[0] ${configPath}socks5_outbound.json)"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -7025,11 +7037,18 @@ removeSocks5Routing() {
|
||||||
echoContent yellow "3.卸载全部"
|
echoContent yellow "3.卸载全部"
|
||||||
read -r -p "请选择:" unInstallSocks5RoutingStatus
|
read -r -p "请选择:" unInstallSocks5RoutingStatus
|
||||||
if [[ "${unInstallSocks5RoutingStatus}" == "1" ]]; then
|
if [[ "${unInstallSocks5RoutingStatus}" == "1" ]]; then
|
||||||
removeXrayOutbound socks5_outbound
|
if [[ "${coreInstallType}" == "1" ]]; then
|
||||||
unInstallRouting socks5_outbound outboundTag
|
removeXrayOutbound socks5_outbound
|
||||||
|
unInstallRouting socks5_outbound outboundTag
|
||||||
|
addXrayOutbound z_direct_outbound
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n "${singBoxConfigPath}" ]]; then
|
||||||
|
removeSingBoxConfig socks5_outbound
|
||||||
|
removeSingBoxConfig socks5_outbound_route
|
||||||
|
addSingBoxOutbound 01_direct_outbound
|
||||||
|
fi
|
||||||
|
|
||||||
removeSingBoxConfig socks5_outbound_route
|
|
||||||
removeSingBoxConfig socks5_inbound_route
|
|
||||||
elif [[ "${unInstallSocks5RoutingStatus}" == "2" ]]; then
|
elif [[ "${unInstallSocks5RoutingStatus}" == "2" ]]; then
|
||||||
|
|
||||||
removeSingBoxConfig 20_socks5_inbounds
|
removeSingBoxConfig 20_socks5_inbounds
|
||||||
|
@ -7037,11 +7056,20 @@ removeSocks5Routing() {
|
||||||
|
|
||||||
handleSingBox stop
|
handleSingBox stop
|
||||||
elif [[ "${unInstallSocks5RoutingStatus}" == "3" ]]; then
|
elif [[ "${unInstallSocks5RoutingStatus}" == "3" ]]; then
|
||||||
removeSingBoxConfig 20_socks5_inbounds
|
if [[ "${coreInstallType}" == "1" ]]; then
|
||||||
removeSingBoxConfig socks5_inbound_route
|
removeXrayOutbound socks5_outbound
|
||||||
|
unInstallRouting socks5_outbound outboundTag
|
||||||
|
addXrayOutbound z_direct_outbound
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n "${singBoxConfigPath}" ]]; then
|
||||||
|
removeSingBoxConfig socks5_outbound
|
||||||
|
removeSingBoxConfig socks5_outbound_route
|
||||||
|
removeSingBoxConfig 20_socks5_inbounds
|
||||||
|
removeSingBoxConfig socks5_inbound_route
|
||||||
|
addSingBoxOutbound 01_direct_outbound
|
||||||
|
fi
|
||||||
|
|
||||||
removeXrayOutbound socks5_outbound
|
|
||||||
unInstallRouting socks5_outbound outboundTag
|
|
||||||
handleSingBox stop
|
handleSingBox stop
|
||||||
else
|
else
|
||||||
echoContent red " ---> 选择错误"
|
echoContent red " ---> 选择错误"
|
||||||
|
@ -7697,7 +7725,6 @@ customXrayInstall() {
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [[ "${selectCustomInstallType}" == "7" ]]; then
|
if [[ "${selectCustomInstallType}" == "7" ]]; then
|
||||||
selectCustomInstallType=",${selectCustomInstallType},"
|
selectCustomInstallType=",${selectCustomInstallType},"
|
||||||
else
|
else
|
||||||
|
@ -9171,7 +9198,7 @@ menu() {
|
||||||
cd "$HOME" || exit
|
cd "$HOME" || exit
|
||||||
echoContent red "\n=============================================================="
|
echoContent red "\n=============================================================="
|
||||||
echoContent green "作者:mack-a"
|
echoContent green "作者:mack-a"
|
||||||
echoContent green "当前版本:v3.2.55"
|
echoContent green "当前版本:v3.3.1"
|
||||||
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