From 3b5a9452388a6e0c31451c37d1aa54436b77e5a4 Mon Sep 17 00:00:00 2001 From: fscarmen <62703343+fscarmen@users.noreply.github.com> Date: Tue, 29 Apr 2025 07:15:40 +0000 Subject: [PATCH] Fix: downgrade sing-box to v1.12.0-beta.6 due to critical bug in beta.7 --- force_version | 1 + sing-box.sh | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/force_version b/force_version index e69de29..d2680c6 100644 --- a/force_version +++ b/force_version @@ -0,0 +1 @@ +1.12.0-beta.6 \ No newline at end of file diff --git a/sing-box.sh b/sing-box.sh index b87c751..e6a6658 100644 --- a/sing-box.sh +++ b/sing-box.sh @@ -639,7 +639,7 @@ check_install() { if [ "${STATUS[0]}" = "$(text 26)" ] && [ ! -s ${WORK_DIR}/sing-box ]; then { # FORCE_VERSION 用于在 sing-box 某个主程序出现 bug 时,强制为指定版本,以防止运行出错 - local FORCE_VERSION=$(wget --no-check-certificate --tries=2 --timeout=3 -qO- ${GH_PROXY}https://raw.githubusercontent.com/fscarmen/sing-box/refs/heads/main/force_version | sed 's/^[vV]//g') + local FORCE_VERSION=$(wget --no-check-certificate --tries=2 --timeout=3 -qO- ${GH_PROXY}https://raw.githubusercontent.com/fscarmen/sing-box/refs/heads/main/force_version | sed 's/^[vV]//g; s/\r//g') if grep -q '.' <<< "$FORCE_VERSION"; then local ONLINE="$FORCE_VERSION" else @@ -788,7 +788,7 @@ check_system_info() { # 针对部分系统作特殊处理 ARGO_DAEMON_FILE='/etc/systemd/system/argo.service'; SINGBOX_DAEMON_FILE='/etc/systemd/system/sing-box.service' - if [ "$SYSTEM" = 'CentOS' ]; then + if [ "$SYSTEM" = 'CentOS' ]; then IS_CENTOS="CentOS$(echo "$SYS" | sed "s/[^0-9.]//g" | cut -d. -f1)" elif [ "$SYSTEM" = 'Alpine' ]; then ARGO_DAEMON_FILE='/etc/init.d/argo'; SINGBOX_DAEMON_FILE='/etc/init.d/sing-box' @@ -1062,7 +1062,7 @@ check_dependencies() { fi # 检测 Linux 系统的依赖,升级库并重新安装依赖 - local DEPS_CHECK=("wget" "tar" "ss" "bash" "openssl") + local DEPS_CHECK=("wget" "tar" "ip" "bash" "openssl") local DEPS_INSTALL=("wget" "tar" "iproute2" "bash" "openssl") [ "$SYSTEM" != 'Alpine' ] && DEPS_CHECK+=("systemctl") && DEPS_INSTALL+=("systemctl") for g in "${!DEPS_CHECK[@]}"; do @@ -3251,7 +3251,7 @@ uninstall() { # Sing-box 的最新版本 version() { # FORCE_VERSION 用于在 sing-box 某个主程序出现 bug 时,强制为指定版本,以防止运行出错 - local FORCE_VERSION=$(wget --no-check-certificate --tries=2 --timeout=3 -qO- ${GH_PROXY}https://raw.githubusercontent.com/fscarmen/sing-box/refs/heads/main/force_version | sed 's/^[vV]//g') + local FORCE_VERSION=$(wget --no-check-certificate --tries=2 --timeout=3 -qO- ${GH_PROXY}https://raw.githubusercontent.com/fscarmen/sing-box/refs/heads/main/force_version | sed 's/^[vV]//g; s/\r//g') if grep -q '.' <<< "$FORCE_VERSION"; then local ONLINE="$FORCE_VERSION" else