From 47425ce255157107bc55dfeeb42bd1a74a9ee7e9 Mon Sep 17 00:00:00 2001 From: Khachatryan Karen Date: Mon, 24 Mar 2025 13:50:41 +0300 Subject: [PATCH] antiblock: Update to 2.1.1 1) Fixed a bug that not all routers were deleted. 2) Log updated. 3) The "output" option has been removed from the service, it is now /tmp/antiblock Signed-off-by: Khachatryan Karen --- net/antiblock/Makefile | 4 ++-- net/antiblock/files/etc/config/antiblock | 1 - net/antiblock/files/etc/init.d/antiblock | 14 ++++++-------- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/net/antiblock/Makefile b/net/antiblock/Makefile index 47b1659476..4ddd9fd030 100644 --- a/net/antiblock/Makefile +++ b/net/antiblock/Makefile @@ -1,13 +1,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=antiblock -PKG_VERSION:=2.1.0 +PKG_VERSION:=2.1.1 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/karen07/antiblock PKG_SOURCE_VERSION:=v$(PKG_VERSION) -PKG_MIRROR_HASH:=898e06eb32a6617e731a1777845c7d59f70fff24ab7a931209fc1065eb119fbd +PKG_MIRROR_HASH:=61183b8c4710896dde95fc4ca065a31224161bfc98c6040ca93950ef190afc53 PKG_MAINTAINER:=Khachatryan Karen PKG_LICENSE:=GPL-3.0-or-later diff --git a/net/antiblock/files/etc/config/antiblock b/net/antiblock/files/etc/config/antiblock index 471eb3ba78..11f174a9d1 100644 --- a/net/antiblock/files/etc/config/antiblock +++ b/net/antiblock/files/etc/config/antiblock @@ -5,7 +5,6 @@ #Optional parameters: #option log '1' #option stat '1' - #option output '/test/' #list blacklist 'x.x.x.x/xx' #list blacklist 'x.x.x.x/xx' diff --git a/net/antiblock/files/etc/init.d/antiblock b/net/antiblock/files/etc/init.d/antiblock index 0bccffa44b..981e31b271 100644 --- a/net/antiblock/files/etc/init.d/antiblock +++ b/net/antiblock/files/etc/init.d/antiblock @@ -4,8 +4,8 @@ USE_PROCD=1 START=99 prog_name="antiblock" -blacklist_folder="/tmp/$prog_name" -blacklist_file="$blacklist_folder/blacklist" +tmp_folder="/tmp/$prog_name" +blacklist_file="$tmp_folder/blacklist" routes_parse() { local _config="$1" @@ -20,7 +20,7 @@ routes_parse() { } blacklist_parse() { - [ "${_blacklist_count}" -eq "0" ] && mkdir -p $blacklist_folder && >$blacklist_file + [ "${_blacklist_count}" -eq "0" ] && mkdir -p $tmp_folder && >$blacklist_file _blacklist_count=$(expr "${_blacklist_count}" + 1) echo "$1" >>$blacklist_file } @@ -34,12 +34,10 @@ start_service() { echo "AntiBlock start" - local _output local _log local _stat local _test - config_get _output "config" "output" config_get_bool _log "config" "log" "0" config_get_bool _stat "config" "stat" "0" config_get_bool _test "config" "test" "0" @@ -59,10 +57,10 @@ start_service() { _listen="$(uci -q get network.lan.ipaddr):53" procd_append_param command -l "${_listen}" - [ -n "${_output}" ] && mkdir -p "${_output}" && procd_append_param command -o "${_output}" + procd_append_param command -o "$tmp_folder" [ "${_blacklist_count}" -ne "0" ] && procd_append_param command -b "$blacklist_file" - [ "${_log}" -ne "0" ] && procd_append_param command --log - [ "${_stat}" -ne "0" ] && procd_append_param command --stat + [ "${_log}" -ne "0" ] && mkdir -p $tmp_folder && procd_append_param command --log + [ "${_stat}" -ne "0" ] && mkdir -p $tmp_folder && procd_append_param command --stat [ "${_test}" -ne "0" ] && procd_append_param command --test procd_close_instance -- 2.30.2