Skip to content

Commit

Permalink
feat(脚本): 修复个性化安装sing-box时Vision消失的问题、修复删除订阅无法删除的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
mack-a committed Jan 1, 2024
1 parent 807905d commit b49fee4
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 @@ -4026,7 +4026,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 @@ -7307,14 +7307,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 @@ -8339,7 +8343,7 @@ menu() {
cd "$HOME" || exit
echoContent red "\n=============================================================="
echoContent green "作者:mack-a"
echoContent green "当前版本:v3.1.21"
echoContent green "当前版本:v3.1.22"
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
echoContent green "描述:八合一共存脚本\c"
showInstallStatus
Expand Down

0 comments on commit b49fee4

Please sign in to comment.