fix(脚本): 修复xray-core无法卸载socks5分流问题

pull/924/head^2
mack-a 2024-01-17 15:29:12 +08:00
parent 28fb2a7ecd
commit a7738f48ef
1 changed files with 17 additions and 11 deletions

View File

@ -6637,6 +6637,7 @@ socks5OutboundRoutingMenu() {
;; ;;
3) 3)
showSingBoxRoutingRules socks5_outbound_route showSingBoxRoutingRules socks5_outbound_route
showXrayRoutingRules socks5_outbound
socks5OutboundRoutingMenu socks5OutboundRoutingMenu
;; ;;
4) 4)
@ -6696,14 +6697,19 @@ showSingBoxRoutingRules() {
if [[ -n "${singBoxConfigPath}" ]]; then if [[ -n "${singBoxConfigPath}" ]]; then
if [[ -f "${singBoxConfigPath}$1.json" ]]; then if [[ -f "${singBoxConfigPath}$1.json" ]]; then
jq .route.rules "${singBoxConfigPath}$1.json" jq .route.rules "${singBoxConfigPath}$1.json"
else
echoContent red " ---> 未安装相应功能"
fi fi
else
echoContent red " ---> 未安装相应功能"
fi 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分流 # 卸载Socks5分流
removeSocks5Routing() { removeSocks5Routing() {
echoContent skyBlue "\n功能 1/1 : 卸载Socks5分流" echoContent skyBlue "\n功能 1/1 : 卸载Socks5分流"
@ -6714,8 +6720,8 @@ removeSocks5Routing() {
echoContent yellow "3.卸载全部" echoContent yellow "3.卸载全部"
read -r -p "请选择:" unInstallSocks5RoutingStatus read -r -p "请选择:" unInstallSocks5RoutingStatus
if [[ "${unInstallSocks5RoutingStatus}" == "1" ]]; then if [[ "${unInstallSocks5RoutingStatus}" == "1" ]]; then
unInstallOutbounds socks5_outbound_route unInstallOutbounds socks5_outbound
unInstallRouting socks5_outbound_route outboundTag unInstallRouting socks5_outbound outboundTag
removeSingBoxConfig socks5_outbound_route removeSingBoxConfig socks5_outbound_route
removeSingBoxConfig socks5_inbound_route removeSingBoxConfig socks5_inbound_route
@ -6728,9 +6734,8 @@ removeSocks5Routing() {
removeSingBoxConfig 20_socks5_inbounds removeSingBoxConfig 20_socks5_inbounds
removeSingBoxConfig socks5_inbound_route removeSingBoxConfig socks5_inbound_route
unInstallOutbounds socks5_outbound_route unInstallOutbounds socks5_outbound
unInstallRouting socks5_outbound_route outboundTag unInstallRouting socks5_outbound outboundTag
else else
echoContent red " ---> 选择错误" echoContent red " ---> 选择错误"
exit 0 exit 0
@ -8873,6 +8878,7 @@ singBoxVersionManageMenu() {
fi fi
if [[ "${selectSingBoxType}" == "1" ]]; then if [[ "${selectSingBoxType}" == "1" ]]; then
installSingBox 1 installSingBox 1
handleSingBox stop
handleSingBox start handleSingBox start
elif [[ "${selectSingBoxType}" == "2" ]]; then elif [[ "${selectSingBoxType}" == "2" ]]; then
handleSingBox stop handleSingBox stop
@ -8896,7 +8902,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.1.34" echoContent green "当前版本v3.1.35"
echoContent green "Githubhttps://github.com/mack-a/v2ray-agent" echoContent green "Githubhttps://github.com/mack-a/v2ray-agent"
echoContent green "描述:八合一共存脚本\c" echoContent green "描述:八合一共存脚本\c"
showInstallStatus showInstallStatus