Adblock-lean: set up adblock using dnsmasq blocklist

Update was successful. Thank you for your efforts. It's been a pleasure to watch you guys in action!

Does the readme need to be updated to include the extra files in the backup files list?

1 Like

That's odd because the code checks whether the instance status is 'running' before checking if the conf-dir exists. So looks like you had a running dnsmasq instance but for some reason its conf-dir was missing. Not really sure how this could have happened. I can only reproduce this behavior by manually deleting the conf-dir while the instance is running. We could automatically restart dnsmasq in such case and re-check whether the conf-dir exists, but considering that normally this situation should only happen when there is a deeper issue with dnsmasq, I think it's better to keep the current behavior, in order to make the user aware of the issue.

1 Like

Indeed, we should update this section of the readme. Thank you for this reminder.

Edit: updated the README.

3 Likes

Prior to v0.6.0, I was only receiving notification of this line.

New blocklist installed with entries count: xxxxx

After the latest update v0.6.0, I'm receiving the log as well.

This is what I have in the abl_custom-script.sh

report_success()
{
curl -s -X POST https://api.telegram.org/botxxx/sendMessage -d chat_id=-591xxx584 -d text="$1"
}

report_failure()
{
curl -s -X POST https://api.telegram.org/botxxx/sendMessage -d chat_id=-591xxx584 -d text="Adblock update failed"
}

2 Likes

Indeed, I forgot to mention this. The log was supposed to be included with the success and failure notifications, but it wasn't, because of an issue with the code. I accidentally found this issue while refactoring the code and fixed it. If you prefer the log to not be included, I suppose we could revert this change.

1 Like

Hi. Yes, I preferred not to have the log shown. It is quite long. Thank you.

I sent a pull request addressing this, the typo reported by @dave14305 and some additional minor things.

@Lynx I think we can merge this to master and maybe add a new minor release.

2 Likes

Could the log be a second argument to the success/failure function? That way optionally people could adjust their message.

E.g.

report_success()
{
curl -s -X POST https://api.telegram.org/botxxx/sendMessage -d chat_id=-591xxx584 -d text="$1 - LOG - $2"
}

report_failure()
{
curl -s -X POST https://api.telegram.org/botxxx/sendMessage -d chat_id=-591xxx584 -d text="Adblock update failed"
}

Just a thought

This is possible but I think we'll wait until someone requests to have the log included. Looks like everyone has been doing fine without it so far.

1 Like

So we have reverted that change in current master. I'm not sure the few minor changes from last release warrant a new release right now, but if you want to use this code, you can temporarily switch to the snapshot update channel of adblock-lean with this command:

service adblock-lean update -v snapshot

Once we make a new release, you can switch back to the release channel with this command:

service adblock-lean update -v latest
4 Likes

Would it be possible in the "User-configurable calls on success or failure" section at github to point out, that you need put in the path to the custom script to the adblock-lean config file?

It already says that:

  • Edit your config file custom_script path. Recommended path is '/usr/libexec/abl_custom-script.sh', which the adblock-lean luci app will have permission to access (for when the luci app is ready)

I wonder whether you missed this or is the sentence not clear enough?

1 Like

I've simply misread it. My bad.
Ignore my post.

Hi all, I am trying to implement @Lynx's idea to have multithreaded download and processing of blocklists in adblock-lean. There is an initial implementation which would be nice to have tested. If you would like to help with that, please refer to this post in the adblock-lean development thread and reply there.

Independent of the multithreading implementation, I pushed 4 commits to our 'master' branch which fix a couple of bugs related to updating adblock-lean. Nothing critical but these could cause errors printed to console under certain circumstances. Unless you are using a snapshot version of adblock-lean, you will not see a notification about available update just yet. Once @Lynx reviews the commits, I think we can go ahead and issue a new release which will include these fixes.

2 Likes

I came across this btw:

1 Like

This is a project by @Ree9. It is currently a bit behind the adblock-lean development (which is notably difficult to keep up with our current development pace). So not sure to what extent it works with the current adblock-lean version. But you are welcome to test and let us know.

P.s @Lynx can we make a release from current master? It mainly fixes update-related bugs and should help avoid support requests when the next release hits (and make it easier to ask for help with testing of the Concurrency branch code).

Sounds good! Really hoping to get some time soon. Too many things calling for my attention right now.

1 Like

Fellow adblockers, a new adblock-lean release (v0.6.1) is now available.

This is mainly a bugfix release, with following changes:

  • Revert attaching session log when calling report_success() from custom script (thanks @duceduc for requesting this change)
  • Minor improvement to console messages
  • Fix old libraries still used while updating adblock-lean and accepting the 'Start adblock-lean now?' dialog
  • Fix error while updating adblock-lean and the new version has a different config format
  • Fix a typo reported by @dave14305 (was not affecting functionality in most use cases but good to have it fixed)

To update:
Most users can run the usual

service adblock-lean update

Users who are currently on the 'snapshot' update channel can switch to the release update channel by running

service adblock-lean update -v latest

Enjoy!

P.s. we are still looking for volunteers who can help with testing the (likely) upcoming implementation of multithreaded downloads and processing in adblock-lean. This is a pretty big change in the processing code which has the potential to significantly speed up blocklist processing, and at this point it's mostly fleshed-out, but there is no point to push it to master before it goes through at least some real-world testing. Please refer to this post if you are willing to help.

3 Likes

Hello, about 3 weeks ago I changed ISP, from Vodafone to 1and1. In the process I also changed the hardware in front of the OpenWRT, from Fritzbox with Exposed Host to TP-Link Archer 2100 with DMZ. The PPPOE connection is on the Archer because I need the telephone system on it. The WAN port on the OpenWRT has a static address and the DNS is 1.1.1.1, which I didn't have to specify before, but without a fixed DNS the WLAN devices could no longer access the Internet.

Since then, the commercials on YouTube are no longer blocked and I can't figure out what else could be causing this. On the WAN side of the Archer, I changed the ISP DNS servers to those of Cloudflare, but to no avail.

Has something been changed within adblock-lean or possibly on the Youtube side? Or is it due to 1and1 as ISP? Is there anything known?