AdBlock bugulance

Discuss the technical details of Gargoyle and ongoing development

Moderator: Moderators

Post Reply
stuartbh
Posts: 76
Joined: Sun Oct 20, 2019 4:18 pm

AdBlock bugulance

Post by stuartbh »

Gargoyle developers and maintainers,

I have not logged in for a number of days and thus only became aware of the release of 1.12 in the last few minutes. As such, I have not installed it upon my router, nor am aware of if this issue is resolved with that version or not.

There exists within the scope of the Gargoyle AdBlock plugin code some bugulance in need of remediation.

crontab (as configured by AdBlock upon initial setup) ostensibly executes a script to update the AdBlock files at 4AM, on any Sunday of any week of any month. However, I noticed my AdBlock updates were not automatically forthcoming and thus I conducted an investigation as to what the instigates were to such anomalous behavior.

Notwithstanding the choice of executing the script via cron or from the command line, the results nonetheless should be coterminous. Thus, I exacted a test from the command line in order observe any results.

Within the /etc/crontab/root file there exists a line:

0 4 * * 0 sh /plugin_root/usr/lib/adblock/runadblock.sh

However, when tested from the command line a problem become rather obvious:

root@wrt3200acm:/# sh /plugin_root/usr/lib/adblock/runadblock.sh
uci: Parse error (option/list command found before the first section) at line 1, byte 1
root@wrt3200acm:/#

The offending line would seem to be line 138 (as follows hereupon):

uci set adblock.config.lastrun="$LASTRUN" && uci commit

I am not familiar with the uci command, its source or what it does (except to say I did read the help provided by the command line help option).

I will try to do some further experimentation as time permits; however, I am sure there are folks here far more familiar with the uci program than I and likely will conclude the solution faster than I will.

Thank you in advance and as always to everyone that takes time to maintain and improve this project.

I am off to backup my router and obtain the lastest 1.12 version of the firmware.
Very Respectfully,

Stuart, N3GWG
Computer Scientist

ispyisail
Moderator
Posts: 5194
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: AdBlock bugulance

Post by ispyisail »

UCI
https://openwrt.org/docs/guide-user/base-system/uci

There are actually "big picture" problems with ad block and a few other gargoyle features that use DNS

viewtopic.php?f=5&t=12182&p=54825#p54825

The post by Eric is the important one

Http to Https

DNS to DoH

As the internet becomes encrypted Gargoyle can no loger tell what the traffic is.

viewtopic.php?f=5&t=12190

stuartbh
Posts: 76
Joined: Sun Oct 20, 2019 4:18 pm

Re: AdBlock bugulance

Post by stuartbh »

ispyisail wrote:UCI
https://openwrt.org/docs/guide-user/base-system/uci

There are actually "big picture" problems with ad block and a few other gargoyle features that use DNS

viewtopic.php?f=5&t=12182&p=54825#p54825

The post by Eric is the important one

Http to Https

DNS to DoH

As the internet becomes encrypted Gargoyle can no loger tell what the traffic is.

viewtopic.php?f=5&t=12190
I am not trying to be curt, but, I guess you are saying that because AdBlock might become less useful in the future we should not make an attempt to fix the automatic updating of it (the manual, via the GUI updating does work)?

Exclusive of automatic udpating, AdBlock does work well for me. I will look at the uci command and see if I can find a solution myself (which surely I will post here if I do), just wanted to make sure it wasn't something someone already fixed before I put time onto it.

By the way, I did install 1.12 and do not know yet if automatic updating was fixed by that version yet. I will know tomorrow.
Very Respectfully,

Stuart, N3GWG
Computer Scientist

ispyisail
Moderator
Posts: 5194
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: AdBlock bugulance

Post by ispyisail »

If you can fix it, all good.

I'm suggesting that Lantis may not put much time into this if in a few weeks time the feature stops working all together.

From my understanding firefox is now fully encrypted and Chrome is ready to go, just needs to be manually activated. If users start switching to firefox the process will accelerate in my opinion

stuartbh
Posts: 76
Joined: Sun Oct 20, 2019 4:18 pm

Re: AdBlock bugulance

Post by stuartbh »

ispyisail wrote:If you can fix it, all good.

I'm suggesting that Lantis may not put much time into this if in a few weeks time the feature stops working all together.

From my understanding firefox is now fully encrypted and Chrome is ready to go, just needs to be manually activated. If users start switching to firefox the process will accelerate in my opinion
"The feature stops working all together", for this to be the case (as opposed the utility of AdBlock being de-valuated by technological advances, that is to say fully encrypted browsers), the generators of the lists that AdBlock leverages would need to cease generating the lists, that is not something I understood was going to happen in the next few weeks.

Now, if what you really meant was the devaluation of the utility of such a solution as AdBlock and not that the "feature stops working all together" and is rendered useless due to a lack of updates, then such an argument must be inherently presuming that every Gargoyle router user, and their connected clients (be they tablets, phones, or computers), as well as any possible person that would connect to a Gargoyle guest network will be making such an upgrade in the coming two weeks. Because, if you feel that this is not what is going to actually happen in the next few weeks (I don't think all those users will switch en masse in two weeks), then AdBlock will remain relevant (presuming updates remain forthcoming persistently) and useful for the foreseeable future most assuredly and render this argument specious.

Moreover, it is of interest to consider that historical dialogues on these very forums have suggested that Gargoyle is targeted at the lowest common denominator or most basic level of user and not power users like myself (which makes sense since power users are in the minority), then it now it seems we are presuming that this same user set will have latest up to date browsers in the next few weeks and thus AdBlock is not worth fixing...interesting...

Now, if the developers and maintainers are busy fixing security or core functionality bugs ("big bugs") and such other related concerns and this is just too low of a priority to work on, I surely would never argue such logic.

With all that being said, I am going to wait until after 4AM tonight to see if the new V1.12 of Gargoyle updates my AdBlock data.

I also noticed (at least relative to V1.12, not sure if this was true in the past also) that the default IP range for the exemption of clients defaults to 192.168.1.1 to 192.168.1.255, even after the router's default IP range had been changed to something like 192.168.50.1 for its internal address and DHCP is issuing 192.168.50.x addresses. I would imagine it would be smarter to default to the range being used by the router's configuration. Again, for the basic user, this just makes it easier and less likely to cause a configuration issue to be overlooked.

Lastly, in cases were plugins are installed and configured and a pre-upgrade backup is conducted, these plugin configuration files do not seem to be preserved. Moreover, I think the backup process should be able to allow the user to add files to be preserved (such as 'afp.conf' if netatalk is installed manually or some such other feature).

Then, whence an upgrade is conducted and a new version of Gargoyle is installed it would be possible to say okay, we had these plugins installed before, if they are still available I will go ahead and install them automatically or after the affirmation by asking a user "Shall I re-install all the plug-ins you had 5 minutes before you upgraded?"

Then, not only would those plugins be there easily but so to would their preserved configuration files in addition, all easing the upgrade process for the most basic user (and advanced users too).
Very Respectfully,

Stuart, N3GWG
Computer Scientist

Lantis
Moderator
Posts: 6920
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: AdBlock bugulance

Post by Lantis »

uci: Parse error (option/list command found before the first section) at line 1, byte 1
I'd suggest there's something wrong in the /etc/config/adblock file. Maybe a corrupted install.
I would imagine it would be smarter to default to the range being used by the router's configuration. Again, for the basic user, this just makes it easier and less likely to cause a configuration issue to be overlooked.
Yes that would be a much better way of doing it. Adblock was one of my first contributions to this project, and i had much less experience back then, hence the oversight.
Please feel free to send a patch for this.
Lastly, in cases were plugins are installed and configured and a pre-upgrade backup is conducted, these plugin configuration files do not seem to be preserved. Moreover, I think the backup process should be able to allow the user to add files to be preserved (such as 'afp.conf' if netatalk is installed manually or some such other feature).
Everything in /etc/config is preserved, hence these should also be included. Are you seeing different behaviour?
Sysupgrade (with settings preserved) also keeps this folder.
Additional files can be added to /etc/sysupgrade.conf if you want to keep them over sysupgrade.
If you would like backups to be configurable, please feel free to send a patch.
Then, whence an upgrade is conducted and a new version of Gargoyle is installed it would be possible to say okay, we had these plugins installed before, if they are still available I will go ahead and install them automatically or after the affirmation by asking a user "Shall I re-install all the plug-ins you had 5 minutes before you upgraded?"
Logistical nightmare of dependencies and non backwards compatible changes. This is not a simple request.


FYI, you probably also want to make the changes here:
https://github.com/ericpaulbishop/gargo ... ef730ab88f
As these are not included in 1.12 yet.
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

Post Reply