Adblock Plugin

Want to share your OpenWrt / Gargoyle knowledge? Implemented a new feature? Let us know here.

Moderator: Moderators

lollapalooza
Posts: 122
Joined: Mon Jun 09, 2014 12:53 pm

Re: Adblock Plugin

Post by lollapalooza »

Programming skills are not needed.
You just need to SSH to the router, edit the file (in the same way you would do in any Linux box), and save it.

kwoody51
Posts: 20
Joined: Fri Feb 26, 2021 7:20 pm

Re: Adblock Plugin

Post by kwoody51 »

lollapalooza wrote:
Fri Dec 31, 2021 2:06 pm
Programming skills are not needed.
You just need to SSH to the router, edit the file (in the same way you would do in any Linux box), and save it.
SSH to the router is a little over my head. Sorry... not trying to waste time of those in the know and not opposed to learning. Just need some more handholding :)

So I got in via terminal using @root 192.168.1.1 however I have NO idea how to access what I need as I just see root@Gargoyle:~#

root@Gargoyle:~# /usr/lib/adblock/runadblock.sh
-ash: /usr/lib/adblock/runadblock.sh: Permission denied
root@Gargoyle:~# /plugin_root/adblock/
-ash: /plugin_root/adblock/: Permission denied

lollapalooza
Posts: 122
Joined: Mon Jun 09, 2014 12:53 pm

Re: Adblock Plugin

Post by lollapalooza »

You have to edit the file, and you'll need an editor.
You can use vi ... but I would say this is off topic here, so you'd better search with Google on how to edit files with Linux.

kwoody51
Posts: 20
Joined: Fri Feb 26, 2021 7:20 pm

Re: Adblock Plugin

Post by kwoody51 »

lollapalooza wrote:
Fri Dec 31, 2021 2:29 pm
You have to edit the file, and you'll need an editor.
You can use vi ... but I would say this is off topic here, so you'd better search with Google on how to edit files with Linux.
I busted out my work PC, downloaded WinSCP and updated the file... WAY easier than terminal.

Think it's working now... thanks for the help!

marcelogon
Posts: 3
Joined: Mon Jan 07, 2013 6:18 pm

Re: Adblock Plugin

Post by marcelogon »

I have questions, what block lists do you have in Gargoyle's adblock?
Why isn't it like openwrt that we can choose which ones to use?
How to add new lists?
I'm from the state of Rio de Janeiro in Brazil.

In advance, Congratulations on your work on gargoyle.

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

Re: Adblock Plugin

Post by Lantis »

It isn’t as full featured as the one in OpenWrt is the simple answer. There’s 2 in openwrt, Adblock and SimpleAdblock, and to be honest the gargoyle one is worse than both. It should be reworked, but it has been a low priority for me.

The two lists it currently uses are:
http://winhelp2002.mvps.org/hosts.txt
https://adaway.org/hosts.txt

If you want to add new lists you need to modify the code, which isn’t too difficult.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

marcelogon
Posts: 3
Joined: Mon Jan 07, 2013 6:18 pm

Re: Adblock Plugin

Post by marcelogon »

I have little knowledge in gargoyle, I only know how to install it on the router and configure it. Could you explain in a simple way for laymen, where to find block lists and add in gargoyle? Can you do this using put or vi file?

lollapalooza
Posts: 122
Joined: Mon Jun 09, 2014 12:53 pm

Re: Adblock Plugin

Post by lollapalooza »

marcelogon wrote:
Sun Mar 06, 2022 10:20 am
Could you explain in a simple way for laymen, where to find block lists and add in gargoyle? Can you do this using put or vi file?
Just read the previous messages in this same thread.

User avatar
Igor Isaias Banlian
Posts: 1
Joined: Mon May 16, 2022 9:53 pm
Location: Brazil - São Paulo / SP
Contact:

Re: Adblock Plugin

Post by Igor Isaias Banlian »

I discovered a bizarre bug!

I have a "TP-Link TL-WR1043N/ND v1" router, with 32 MB of RAM, running "Gargoyle 1.12.0 Stable". When I run the "Adblock Plugin", after generating a file with 15 thousand lines, it tries to execute the command "sort" in this file, wiping out what little free RAM this router has and receiving the KILL signal, thus killing the command "sort", not generating "block.build.before" file! The only way I could get a "block.build.before" file (and consequently the final "block.hosts" file) on this router was by removing the "sort" command from the script!

Workaround:

Replace this:

Code: Select all

awk '{sub(/\r$/,"");print $1,$2}' /tmp/block.build.list|sort -u > /tmp/block.build.before
For this:

Code: Select all

awk '{sub(/\r$/,"");print $1,$2}' /tmp/block.build.list > /tmp/block.build.before
Sorry for my bad English, I'm Brazilian!
Last edited by Igor Isaias Banlian on Wed May 18, 2022 5:42 am, edited 1 time in total.

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

Re: Adblock Plugin

Post by Lantis »

I appreciate you coming in and letting us know about the issue and your workaround.
Indeed devices with smaller amounts of RAM will struggle with the block lists. The OpenWrt version of the adblock plugin allows you to selectively disable certain lists with the intent that smaller devices use smaller lists. Our plugin desperately needs a rewrite to follow similar steps.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

Post Reply