Commit Graph

60 Commits

Author SHA1 Message Date
Stan Grishin 65f4d3a0b4 simple-adblock: bugfixes for uci_load_validate
* fix validation for force_dns_port when missing in config
* fix validation for dns_instance when * or - are used

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit ad8aa084c1)
2023-08-15 16:33:48 +00:00
Stan Grishin af7b0f9eff simple-adblock: force_dns_port validation bugfix
Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 173d163f09)
2023-08-08 09:33:18 +00:00
Stan Grishin 8b97c69f42 simple-adblock: dnsmasq access bugfix & misc improvements
* fix permission to dnsmasq files for ad-blocking
* add pause function to pause the ad-blocking temporarily
* introduce pause_timeout option to control default pause time
* update default config and config-update file
* use $param instead of $1 in adb_start()

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit dea274cc33)
2023-07-23 05:18:22 +00:00
Stan Grishin a080da667f simple-adblock: add family to firewall json objects
Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 0b84504670)
2023-05-07 02:33:12 +00:00
Stan Grishin 5b7e01ad52 simple-adblock: implement curl_additional_param compressed_cache_dir
* curl_additional_param: to pass additional parameters (like proxy) to curl
* compressed_cache_dir: where to store compressed cache in non-volitile memory

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 549a66bbfa)
2023-04-03 21:26:09 +00:00
Stan Grishin ae7dd67aac simple-adblock: update init file and config
* move network.sh and jshn.sh includes into load_validate_config function
  to prevent errors when adding the package to image with the Image Builder
* add @bongochong compressed domains block-list to the config

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 35f4830de7)
2023-03-11 10:49:16 +00:00
Stan Grishin 48d58b61cc simple-adblock: bugfix: ensure directory for jsonFile is created
Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 2bb10d0c2c)
2023-02-19 20:24:21 +00:00
Stan Grishin b0050dc7fe simple-adblock: implement procd_boot_wan_timeout support
* implement procd_boot_wan_timeout support
* update config with oisd ABPlus and domains lists

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 587cd4d0d7)
2023-02-19 05:12:25 +00:00
Stan Grishin f38c9e1d27 simple-adblock: update to 1.9.4-1
* update default config for new oisd.nl lists
* conf.update file to migrate oisd.nl lists to the new format
* introduce AdBlockPlus lists support (new oisd.nl format)
* longer wait for WAN up/gateway detection
* make load_environemnt only execute once to suppress duplicate
  warnings/errors

PS. While I was testing this, oisd.nl has brought back the old domains
    lists as well, so this version supports both as I'm unclear as to
    why the "big" ABPlus list is only 6.2Mb where as the "big" domains
    list is whopping 19.9Mb.

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 6c45b40317)
2023-02-16 23:30:18 +00:00
Stan Grishin 97c38b456e simple-adblock: update to 1.9.3-7
* add boot() function which waits for network.interface to come up
* switch oisd.nl hosts entry to domains
* remove erroneous oisd substitution from config-update file

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 8c8384611b)
2023-02-04 22:52:40 +00:00
Stan Grishin 3232bd0495 simple-adblock: update sed for allowing domains
Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 4b77f94b53)
2023-01-14 23:50:17 +00:00
Stan Grishin cabc98c447 simple-adblock: bugfix: add dnsmasq.nftset to uci_load_validate
* fixes https://github.com/openwrt/openwrt/issues/11481 thanks to:
* https://github.com/mistepien for reporting
* https://github.com/dave14305 for diagnosing

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit fff884e67f)
2022-12-12 21:54:13 +00:00
Stan Grishin 1c6c8cee44 simple-adblock: support new OISD dnsmasq config
* OISD dnsmasq config files switched from using address= to server=

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 3950f0ce99)
2022-12-10 01:59:54 +00:00
Stan Grishin 6cf7648bd9 simple-adblock: localizable error/warning messages
* store all error/warning messages with the error text id so that
  they can be made localizable for the luci app

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 8047d2ccb7)
2022-11-29 22:41:55 +00:00
Stan Grishin 2e7ce8a23c simple-adblock: bugfix: detect dnsmasq ipset support
* Fixes https://github.com/openwrt/packages/issues/19978, thank you
  @parona-source for the report/patch!

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit cc10774e6e)
2022-11-28 21:25:15 +00:00
Stan Grishin 553d07845d simple-adblock: update to 1.9.3-1
* introduce the new curl_max_file_size option
* prevent warnings/errors to be displayed each time the load_environment
  is invoked
* better organize dl_command appendixes
* implement support for downloading/using external dnsmasq config file
* refactor adb_check and adb_allow for better readability
* update default values for some options in the uci_load_validate call
* update reload trigger to include curl options

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit f11ce28baf)
2022-11-14 19:24:04 +00:00
Stan Grishin 2f7a640bc7 simple-adblock: update to 1.9.2-4
* update default config file to list options alphabetically
* rearrange some of the init script code to support transition
  of WebUI to javascript
* rename wan6_trigger to procd_trigger_wan6 for readability

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 7393b74457)
2022-11-08 00:46:25 +00:00
Stan Grishin b2727bbe02 simple-adblock: rename wan6_trigger option
* rename wan6_trigger to procd_trigger_wan6
* reorder options in default config alphabetically

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 491ade4197)
2022-10-25 22:15:43 +00:00
Stan Grishin 0be9e78c08 simple-adblock: service_triggers improvements
Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 188d332840)
2022-10-24 17:04:31 +00:00
Stan Grishin 45cdc86462 simple-adblock: remove unnecessary procd_add_reload_interface_trigger
Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit ef067f6304)
2022-10-21 11:54:52 +00:00
Stan Grishin e8fc003672 simple-adblock: update to 1.9.2-1
* make PKG_VERSION of the init script readonly to remove shellcheck
  exception
* replace exit with return in the the procd scripts per:
  https://github.com/openwrt/packages/pull/19617
* remove custom boot() function as it prevented creation of procd
  firewall object on start on boot
* improve performance of allowing domains code

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 3ba54553ca)
2022-10-18 10:25:40 +00:00
Stan Grishin 356534dd42 simple-adblock: allow domains bugfix & canary domains support
* fix bug in download_lists and adb_allow to prevent unintended exclisions from
  the block-lists of domains containing allowed domain. Fixes issue:
  https://github.com/stangri/source.openwrt.melmac.net/issues/160
* add support for returning NXDOMAIN/blocking iCloud & Mozilla canary domains,
  disabled by default

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 9156ef6507)
2022-10-01 23:19:23 +00:00
Stan Grishin d053da000e simple-adblock: update to 1.9.1-1
* remove obsolete block-lists from config
* add removal of obsolete lists to config-update
* add AdGuard team's block-list to config
* improve allow command
* improve nftset support
* move config load to uci_load_validate, which required some code refactoring which
  looks dramatic, but isn't
* always use dnsmasq_restart instead of dnsmasq_hup for all dns resolution options
  for dnsmasq

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit f8c5fd93e7)
2022-09-27 10:38:33 +00:00
Stan Grishin 7073e7fb00 simple-adblock: bugfix for allow command
Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 717499e62b)
2022-08-26 19:32:33 +00:00
Stan Grishin a1067fa6b1 simple-adblock: update to 1.9.0-1
* Update maintainer's email address
* Style Make and init file to OpenWrt standard
* Rename dnsmasq and unbound-related variables to better reflect
  their use
* New 'allow' CLI parameter to quickly unblock domain(s)
* Switch to uci wrappers
* Beautify the output of the 'check' CLI parameter
* Better handling of output files directory creation error
* Support for (upcoming) dnsmasq nftsets

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 3b686b08a5)
2022-08-24 00:30:33 +00:00
Stan Grishin d11f310230 simple-adblock: update to 1.8.8-1
* update 'check' function

Signed-off-by: Stan Grishin <stangri@melmac.net>
2021-10-15 21:25:14 +00:00
Stan Grishin 94e53c0b3b simple-adblock: delete obsolete iptables-dependent function
Signed-off-by: Stan Grishin <stangri@melmac.net>
2021-10-06 22:40:00 +00:00
Jan Baier ada9d25ef7 simple-adblock: Call killall with the -s
Some versions of killall do support the `killall -SIGNAL` syntax and
have only `-s SIGNAL` which should be supported everywhere.

I see the problem with *killall (PSmisc) 23.3* on latest TurrisOS 5.2

Signed-off-by: Jan Baier <jan.baier@amagical.net>
2021-09-08 17:13:52 -04:00
Stan Grishin 699447cdb3 simple-adblock: update to 1.8.7-6
* supports newer shellcheck
* restore EXTRA_COMMANDS compatibility with 19.07
* move status display from various functions to status_service
* bugfix: status_service line break after output
* minor arythmetic fix in status_service

Signed-off-by: Stan Grishin <stangri@melmac.net>
2021-08-02 07:03:36 +00:00
Stan Grishin 231d40053b simple-adblock: update to 1.8.7-3
Signed-off-by: Stan Grishin <stangri@melmac.net>
2021-04-10 17:08:51 -07:00
Stan Grishin e695cc26b0 simple-adblock: jsonOps-related bugfixes
Signed-off-by: Stan Grishin <stangri@melmac.net>
2021-03-17 22:21:05 -10:00
Stan Grishin 36e2e3fce2 simple-adblock: update to 1.8.5-1
Signed-off-by: Stan Grishin <stangri@melmac.net>
2021-03-08 10:25:11 +00:00
Stan Grishin 182cc9920e simple-adblock: remove dependency on jsonfilter & old code
Signed-off-by: Stan Grishin <stangri@melmac.net>
2021-02-02 22:11:06 +00:00
Stan Grishin 95586689f5 simple-adblock: config update
Signed-off-by: Stan Grishin <stangri@melmac.net>
2020-12-18 22:04:59 -06:00
Stan Grishin 22722a8095 simple-adblock: bugfix - config update
Signed-off-by: Stan Grishin <stangri@melmac.net>
2020-12-12 15:58:21 -06:00
Florian Eckert 04e52a13c4 simple-adblock: use new extra_command function definition
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-11-04 08:50:34 +01:00
Stan Grishin 92e6b29920 simple-adblock: config update file fix
Signed-off-by: Stan Grishin <stangri@melmac.net>
2020-10-09 09:20:55 -10:00
Stan Grishin d7de7813b4 simple-adblock: add config auto-update feature
Signed-off-by: Stan Grishin <stangri@melmac.net>

shellchecked

Signed-off-by: Stan Grishin <stangri@melmac.net>

shellchecked

Signed-off-by: Stan Grishin <stangri@melmac.net>
2020-09-20 01:00:06 +00:00
Stan Grishin 492a49fcc5 simple-adblock: bugfix: update config; use command -v
Signed-off-by: Stan Grishin <stangri@melmac.net>
2020-08-21 23:29:02 +00:00
Stan Grishin e7d2563c57 simple-adblock: README and config update
Signed-off-by: Stan Grishin <stangri@melmac.net>
2020-08-04 22:50:39 +00:00
Stan Grishin 3167c3c4c0 simple-adblock: racially-neutral names
Signed-off-by: Stan Grishin <stangri@melmac.net>
2020-06-13 20:39:00 +00:00
Stan Grishin eb398862b5 simple-adblock: remove obsolete dshield.org links from config
Signed-off-by: Stan Grishin <stangri@melmac.net>
2020-06-08 17:35:32 +00:00
Stan Grishin 901159b8c7 simple-adblock: bugfix: proper error reporting on failed downloads; lists update script
Signed-off-by: Stan Grishin <stangri@melmac.net>
2020-05-27 00:25:57 +00:00
Stan Grishin c805064a7d simple-adblock: bugfix: start downloads on cold boot
Signed-off-by: Stan Grishin <stangri@melmac.net>
2020-04-22 17:45:53 +00:00
Stan Grishin 5df3acdf10 simple-adblock: bugfixes: remove escape chars from log, restore from cache on boot
Signed-off-by: Stan Grishin <stangri@melmac.net>
2020-04-07 21:55:22 +00:00
Stan Grishin 49dbec35f6 simple-adblock: support multiple dnsmasq instances; rework communication between principal package and luci app
Signed-off-by: Stan Grishin <stangri@melmac.net>
2020-03-29 05:13:07 +00:00
Petr Štetiar 8383c19b90 treewide: fix service status command in procd compatible services
Fix breaking change introduced in the main tree with a commit
7519a36774ca ("base-files,procd: add generic service status") where the
old service `status` callback function doesn't work anymore and needs to
be renamed to `status_service`.  This name was chosen for consistency
with start and stop function callbacks, which are using `start_service`
and `stop_service` naming schemes.

While at it, fix whitespace issues in the status_service as well.

Ref: http://lists.infradead.org/pipermail/openwrt-devel/2019-September/019035.html
Reported-by: Dirk Brenken <dev@brenken.org>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2019-11-18 06:28:57 +01:00
Stan Grishin 756bbb7afd simple-adblock: bugfix: proper dnsmasq reload on stop, rework start/stop logic
Signed-off-by: Stan Grishin <stangri@melmac.net>
2019-10-06 09:33:33 -07:00
Stan Grishin 54f4487af1 simple-adblock: bugfix and improvements (check description)
Signed-off-by: Stan Grishin <stangri@melmac.net>
2019-10-03 18:41:49 -07:00
Stan Grishin c6beee74f9 simple-adblock: dnsmasq.ipset option support, better handling of IDNs, updated README
Signed-off-by: Stan Grishin <stangri@melmac.net>
2019-09-24 09:11:45 -07:00