From a7738f48efc045b5f773ee63abfad9af199927a5 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Wed, 17 Jan 2024 15:29:12 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=84=9A=E6=9C=AC):=20=E4=BF=AE=E5=A4=8Dxr?= =?UTF-8?q?ay-core=E6=97=A0=E6=B3=95=E5=8D=B8=E8=BD=BDsocks5=E5=88=86?= =?UTF-8?q?=E6=B5=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/install.sh b/install.sh index 4f519b5..b635679 100644 --- a/install.sh +++ b/install.sh @@ -6637,6 +6637,7 @@ socks5OutboundRoutingMenu() { ;; 3) showSingBoxRoutingRules socks5_outbound_route + showXrayRoutingRules socks5_outbound socks5OutboundRoutingMenu ;; 4) @@ -6696,14 +6697,19 @@ showSingBoxRoutingRules() { if [[ -n "${singBoxConfigPath}" ]]; then if [[ -f "${singBoxConfigPath}$1.json" ]]; then jq .route.rules "${singBoxConfigPath}$1.json" - else - echoContent red " ---> 未安装相应功能" fi - else - echoContent red " ---> 未安装相应功能" fi - } + +# xray内核分流规则 +showXrayRoutingRules() { + if [[ "${coreInstallType}" == "1" ]]; then + if [[ -f "${configPath}09_routing.json" ]]; then + jq ".routing.rules[]|select(.outboundTag==\"$1\")" "${configPath}09_routing.json" + fi + fi +} + # 卸载Socks5分流 removeSocks5Routing() { echoContent skyBlue "\n功能 1/1 : 卸载Socks5分流" @@ -6714,8 +6720,8 @@ removeSocks5Routing() { echoContent yellow "3.卸载全部" read -r -p "请选择:" unInstallSocks5RoutingStatus if [[ "${unInstallSocks5RoutingStatus}" == "1" ]]; then - unInstallOutbounds socks5_outbound_route - unInstallRouting socks5_outbound_route outboundTag + unInstallOutbounds socks5_outbound + unInstallRouting socks5_outbound outboundTag removeSingBoxConfig socks5_outbound_route removeSingBoxConfig socks5_inbound_route @@ -6728,9 +6734,8 @@ removeSocks5Routing() { removeSingBoxConfig 20_socks5_inbounds removeSingBoxConfig socks5_inbound_route - unInstallOutbounds socks5_outbound_route - unInstallRouting socks5_outbound_route outboundTag - + unInstallOutbounds socks5_outbound + unInstallRouting socks5_outbound outboundTag else echoContent red " ---> 选择错误" exit 0 @@ -8873,6 +8878,7 @@ singBoxVersionManageMenu() { fi if [[ "${selectSingBoxType}" == "1" ]]; then installSingBox 1 + handleSingBox stop handleSingBox start elif [[ "${selectSingBoxType}" == "2" ]]; then handleSingBox stop @@ -8896,7 +8902,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v3.1.34" + echoContent green "当前版本:v3.1.35" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus