Skip to content

Commit

Permalink
feat(脚本): 修复个性化安装sing-box时Vision消失的问题、修复删除订阅无法删除的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Wizard89 authored Jan 4, 2024
1 parent 9118440 commit 6bd466c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4027,7 +4027,7 @@ EOF
}
EOF
elif [[ -z "$3" ]]; then
rm /etc/v2ray-agent/sing-box/conf/config/02_VLESS_TCP_inbounds.json >/dev/null 2>&1
rm /etc/v2ray-agent/sing-box/conf/config/05_VMess_WS_inbounds.json >/dev/null 2>&1
fi

# VLESS_Reality_Vision
Expand Down Expand Up @@ -7325,14 +7325,18 @@ addSubscribeMenu() {
if [[ "${addSubscribeStatus}" == "1" ]]; then
addOtherSubscribe
elif [[ "${addSubscribeStatus}" == "2" ]]; then
if [[ ! -f "/etc/v2ray-agent/subscribe_remote/remoteSubscribeUrl" ]]; then
echoContent green " ---> 未安装其他订阅"
exit 0
fi
grep -v '^$' "/etc/v2ray-agent/subscribe_remote/remoteSubscribeUrl" | awk '{print NR""":"$0}'
read -r -p "请选择要删除的订阅编号[仅支持单个删除]:" delSubscribeIndex
if [[ -z "${delSubscribeIndex}" ]]; then
echoContent green " ---> 不可以为空"
exit 0
fi

sed -i "$((delSubscribeIndex + 1))d" "/etc/v2ray-agent/subscribe_remote/remoteSubscribeUrl" >/dev/null 2>&1
sed -i "$((delSubscribeIndex))d" "/etc/v2ray-agent/subscribe_remote/remoteSubscribeUrl" >/dev/null 2>&1

echoContent green " ---> 其他机器订阅删除成功"
subscribe
Expand Down Expand Up @@ -8359,7 +8363,7 @@ menu() {
echoContent red "\n=============================================================="
echoContent green "原作者:mack-a"
echoContent green "作者:Wizard89"
echoContent green "当前版本:v2.9.20"
echoContent green "当前版本:v2.9.21"
echoContent green "Github:https://github.com/Wizard89/v2ray-agent"
echoContent green "描述:八合一共存脚本\c"
showInstallStatus
Expand Down

0 comments on commit 6bd466c

Please sign in to comment.