Skip to content

Commit

Permalink
fix(脚本): 修复xray-core无法卸载socks5分流问题
Browse files Browse the repository at this point in the history
  • Loading branch information
mack-a committed Jan 17, 2024
1 parent 28fb2a7 commit a7738f4
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6637,6 +6637,7 @@ socks5OutboundRoutingMenu() {
;;
3)
showSingBoxRoutingRules socks5_outbound_route
showXrayRoutingRules socks5_outbound
socks5OutboundRoutingMenu
;;
4)
Expand Down Expand Up @@ -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分流"
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -8873,6 +8878,7 @@ singBoxVersionManageMenu() {
fi
if [[ "${selectSingBoxType}" == "1" ]]; then
installSingBox 1
handleSingBox stop
handleSingBox start
elif [[ "${selectSingBoxType}" == "2" ]]; then
handleSingBox stop
Expand All @@ -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
Expand Down

0 comments on commit a7738f4

Please sign in to comment.