Commit Graph

27 Commits

Author SHA1 Message Date
Stan Grishin b5ed85f6e9 adblock-fast: bugfixes and shellcheck update
* BUGFIX: correctly identify available RAM
* BUGFIX: properly store remote list filesize in config
* shellcheck updates

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 4bdaea90d63ed12af4b513d833de64bac5f0f2b8)
2024-09-20 13:22:18 -07:00
Stan Grishin 1e97da910c adblock-fast: update to 1.1.2-3
This version brings two significant updates:
* support for text labels/names for the external lists
* better processing of the config update files, which cleans up
  entries with missing URLs

Also:
* new config file contains names for all lists
* it tries to match existing URLs with the names from the new config file
  and update user config as part of uci-defaults script
* contains minor updates to copyright/license/upstream URL/README
* updates the config update script to remove sysctl.org list as it's outdated
* adds two new remote lists: Hagezi and 1Hosts

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 50e85ed27f)
2024-08-06 09:38:05 +00:00
Stan Grishin c230bf75a0 adblock-fast: update to 1.1.2-1
* move extra_command and EXTRA_HELP to the top of the init file
* add packageCompat variable for compatibility check with WebUI
* add OutputFilter variables for supported resolvers
* simplify adb_check with the use of OutputFilter variables
* add show_blocklist command to display currently blocked domains

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit fb151d5b82)
2024-05-13 04:34:46 +00:00
Stan Grishin 21efddca3c adblock-fast: bugfix: unbound-related fixes
* include `server:` directive at the top of unbound file
* update unbound-related outputGzip variable to include full path
* return always_nxdomain for blocked domains
* also update copyright stamp/license

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 474587a1f4)
2024-04-25 21:34:22 +00:00
Stan Grishin aef7a4a8ee adblock-fast: improve Makefile's prerm
* improve output of Makefile's prerm routines

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 9eb61fe02d)
2024-04-10 23:59:46 +00:00
Stan Grishin fcfac651c7 adblock-fast: prepare migration to APK
Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 706592edcc)
2024-03-23 01:10:27 +00:00
Stan Grishin abe1125669 adblock-fast: add force_dns_interface setting
* allow users to specify list of interfaces/networks to force the
  DNS Hijacking on

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit eafdd63d67)
2024-02-14 04:43:04 +00:00
Stan Grishin ac2736542b adblock-fast: update to 1.1.1-3
* allow top-level domains in the blocked-domains options fixes
  https://github.com/openwrt/packages/issues/23125

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 0f059b6523)
2024-01-19 00:06:14 +00:00
Stan Grishin 58a7c28aaf adblock-fast: sync with main branch
* somehow parts of the code of the init script got different between the
  main branch and release branch, this PR fixes that.

Signed-off-by: Stan Grishin <stangri@melmac.ca>
2024-01-17 17:38:10 +00:00
Stan Grishin b37dec1de1 adblock-fast: bugfix: pause command
* the pause command used to incorrectly cause block-lists reload, this
  has been fixed in this version

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit dfeeabbebf)
2024-01-07 23:08:58 +00:00
Stan Grishin 8ebf99b7ef adblock-fast: update to 1.1.1-1
* move reload/restart logic from json() to config_cache()
* improve fw4 restart decision logic
* no longer store reload/restart info in ubus/status json file
* rename variables pointing to run-time information
* create dns_set_output_values to reuse code in principal all and luci app
* improve append_url to store collected URLs in an alternative variable

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit bab17f480c)
2023-12-15 02:46:26 +00:00
Stan Grishin 73b689f96e adblock-fast: better allow-listing
* improve allow-listing reliability by running sed from the script-file
  instead of the command-line
* fix user for smartdns files ownership

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 693287e961)
2023-12-11 00:58:27 +00:00
Stan Grishin 341d817e2d adblock-fast: bugfix: block domains from config when not using block-lists
* remove empty lines from the combined list to allo optimization code
  to work properly

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 1914114ed3)
2023-12-10 02:51:57 +00:00
Stan Grishin af57f8dbfb adblock-fast: bugfixes: getsize/resolver
* do not use standalone grep-package dependent syntax to get the remote
  file size
* various bugfixes to prevent attempts to change/commit if dnsmasq/smartdns
  are not installed

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 496d9b71ab)
2023-12-08 02:43:27 +00:00
Stan Grishin 473b173ffa adblock-fast: add smartdns ipset/nftset support
* bugfix: correct URL to config-update file
* bugfix: check if uci configs exist before chacking for changes
* add support for smartdns ipset-based blocking
* add support for smartfns nftset-based blocking
* disallow non-ascii symbols for smartdns blocking
* add check wherever fw4 restart is needed before calling
  procd_set_config_changed firewall
* improve clean-up code in resolver()
* improve case code for different resolver settings
* modify load_validate_config to allow smartdns.ipset and smartdns.nftset

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 28cd5ecf6e)
2023-12-06 10:24:30 +00:00
Stan Grishin 61ae8719fb adblock-fast: bugfix: call to missing function
* fix call to is_number to is_integer
* improve boot()

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit ffb396bca9)
2023-11-25 20:55:44 +00:00
Stan Grishin 709456d062 adblock-fast: bufgix: fix boot()
* fix boot()
* reintroduce procd_boot_delay variable to control delay of service
  start on boot
* introduce `check_lists` command to check enabled block-lists for
  domain(s)
* use config_get_bool instead of config_get for boolean options

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 96ad0ab6fd)
2023-11-23 22:55:09 +00:00
Stan Grishin b2e8a5bdd2 adblock-fast: bugfix: ensure downloaded block-lists end with newline
* ensure downloaded block-lists end with newline
* turn free/total RAM checks into functions calls

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 3787b41355)
2023-11-13 10:11:14 +00:00
Stan Grishin 4df5572bbd adblock-fast: update to 1.0.1-1
* update Makefile copyright info
* organize functions shared between the init script, uci-defaults and
  luci app in alphabetical order
* update error, warning and status messaging
* use single quotes instead double quotes for static text labels
* better warning for missing recommended packages
* rename dns function to resolver to better reflect its purpose
* improve resolver cleanup code
* move _resolver_config function inside resolver function to improve code readlibity
* rename _process_file_url to process_file_url_wrapper to better reflect its purpose
* add preflight check for available RAM vs total size of block lists
* move _config_add_url_size function inside adb_sizes function to improve code readlibity
* remove uci validation from status_service function to improve performance
* source init script from uci-defaults to include shared functions

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 11df396a18)
2023-11-08 09:59:47 +00:00
Stan Grishin 2d5990822c adblock-fast: bugfix: allow command
* fix sed to properly purge allowed domains from block-lists
* ensure resolver is restarted on allow command
* reduce pause default/max in attempt to make it work with luci

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 42cc50eec8)
2023-10-21 02:29:27 +00:00
Stan Grishin 80bc44cb7b adblock-fast: bugfix: properly identify hosts-files
* escape dots in grep command to properly identify hosts files

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 13a88d0b79)
2023-10-05 14:53:58 +00:00
Stan Grishin 35fbb73853 adblock-fast: update to 1.0.0-5
* improve processing of dnsmasq config files
* do not run sed/show error if allow_filter is empty

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit f3b8e569a5)
2023-10-03 19:01:00 +00:00
Stan Grishin e805d653dc adblock-fast: update to 1.0.0-5
* improve processing of dnsmasq config files
* do not run sed/show error if allow_filter is empty

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 0dc2aa2e7d67b6b4bce3d3bae9b14e67b90ff0c1)
2023-10-01 23:56:28 +00:00
Stan Grishin 55ca07c788 adblock-fast: better error reporting when nothing to do
* also nicer file type output in high verbosity

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit ed6729c251)
2023-09-28 21:33:47 +00:00
Stan Grishin 6d3ff6df7f adblock-fast: bugfix: better detect ABP lists
* bugfix: better detect ABP lists
* update Makefile with BUSYBOX features dependencies
* update the type of dnsmasq_instance setting
* add error message when file type can't be detected
* add reporting when file type can't be detected
* bugfix: include URL on errors related to URL processing/parsing
* rename resolver function to resolver_config to better reflect its use

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit cfe85fbde3)
2023-09-26 22:52:38 +00:00
Stan Grishin 0d6f18a7d8 adblock-fast: bugfix: remove domains on allow
* fix sed command to properly remove allowed domains from block-file

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit bce310bfcd)
2023-09-16 13:15:14 +00:00
Stan Grishin 7a670e1805 adblock-fast: initial commit
* this package replaces simple-adblock package
* it was impossible to keep existing config structure and continue
  improving the simple-adblock the way I wanted, hence the new
  package name
* the migration script for existing simple-adblock config is included in
  the uci-defaults file

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit be69e34ce3)
2023-09-03 20:40:39 +00:00