From d82cf7d910c2cf681454df313aac650d2bcf115d Mon Sep 17 00:00:00 2001 From: Wizard <66345978+Wizard89@users.noreply.github.com> Date: Tue, 4 Jun 2024 15:48:37 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=84=9A=E6=9C=AC):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B4=A6=E5=8F=B7=E6=97=A0=E6=B3=95=E5=AF=B9?= =?UTF-8?q?vision=E6=B7=BB=E5=8A=A0=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=81?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8D=B8=E8=BD=BDsocks5=E5=88=86=E6=B5=81?= =?UTF-8?q?=E5=90=8E=E6=97=A0=E6=B3=95=E6=AD=A3=E5=B8=B8=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E3=80=81=E6=B7=BB=E5=8A=A0=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?socks5=E5=88=86=E6=B5=81=E8=A7=84=E5=88=99=E6=97=B6=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E8=B4=A6=E5=8F=B7=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 53 ++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/install.sh b/install.sh index b047a6b..e488152 100644 --- a/install.sh +++ b/install.sh @@ -4261,6 +4261,7 @@ EOF installSniffing removeXrayOutbound IPv4_out removeXrayOutbound IPv6_out + removeXrayOutbound socks5_outbound removeXrayOutbound blackhole_out removeXrayOutbound wireguard_out_IPv6 removeXrayOutbound wireguard_out_IPv4 @@ -5726,8 +5727,8 @@ addUser() { elif [[ "${coreInstallType}" == "2" ]]; then clients=$(initSingBoxClients 0 "${uuid}" "${email}") fi - clients=$(jq -r "${userConfig} = ${clients}" ${configPath}${frontingType}.json) - echo "${clients}" | jq . >${configPath}${frontingType}.json + clients=$(jq -r "${userConfig} = ${clients}" ${configPath}02_VLESS_TCP_inbounds.json) + echo "${clients}" | jq . >${configPath}02_VLESS_TCP_inbounds.json fi # VLESS WS @@ -7005,8 +7006,12 @@ showSingBoxRoutingRules() { jq .route.rules "${singBoxConfigPath}$1.json" elif [[ "$1" == "socks5_outbound_route" && -f "${singBoxConfigPath}socks5_outbound.json" ]]; then 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 echoContent yellow "已安装 sing-box socks5全局入站分流" + echoContent yellow "\n出站分流配置:" + echoContent skyBlue "$(jq .outbounds[0] ${singBoxConfigPath}socks5_outbound.json)" fi fi } @@ -7016,8 +7021,15 @@ showXrayRoutingRules() { if [[ "${coreInstallType}" == "1" ]]; then if [[ -f "${configPath}09_routing.json" ]]; then 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 - 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 } @@ -7032,11 +7044,18 @@ removeSocks5Routing() { echoContent yellow "3.卸载全部" read -r -p "请选择:" unInstallSocks5RoutingStatus if [[ "${unInstallSocks5RoutingStatus}" == "1" ]]; then - removeXrayOutbound socks5_outbound - unInstallRouting socks5_outbound outboundTag + if [[ "${coreInstallType}" == "1" ]]; then + 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 removeSingBoxConfig 20_socks5_inbounds @@ -7044,11 +7063,20 @@ removeSocks5Routing() { handleSingBox stop elif [[ "${unInstallSocks5RoutingStatus}" == "3" ]]; then - removeSingBoxConfig 20_socks5_inbounds - removeSingBoxConfig socks5_inbound_route + if [[ "${coreInstallType}" == "1" ]]; then + 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 else echoContent red " ---> 选择错误" @@ -7731,7 +7759,6 @@ customXrayInstall() { exit 0 fi - if [[ "${selectCustomInstallType}" == "7" ]]; then selectCustomInstallType=",${selectCustomInstallType}," else @@ -9205,7 +9232,7 @@ menu() { echoContent red "\n==============================================================" echoContent green "原作者:mack-a" echoContent green "作者:Wizard89" - echoContent green "当前版本:v3.0.59" + echoContent green "当前版本:v3.1.1" echoContent green "Github:https://github.com/Wizard89/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus