What's new

Which Ad-Blocker

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Which Ad-Blocker do you use?

  • Diversion

  • AdGuardHome

  • Other (please specifie in the commands)


Results are only viewable after voting.
Pi-hole with automated firebog list updates. (And hooked in to voice control for extra WAF so she can temporarily disable it when she needs to.)

Prefer it to diversion but haven't tried adguardhome - not had a need to. From everything I've seen it's six of one, half a dozen of the other between them.
 
I've tried most of the adblocking configurations out there. Im currently running Adguard home on the router which I like , it has a nice UI. Pihole is good as is running Adguard on the Pi. Diversion is good , but I like a nice UI which Diversion has'nt got. I'll probobly swithch it up again soon just because I like tinkering with it all :)
I can also highly recomend these blocklists https://github.com/hagezi/dns-blocklists
 
I normally would have run Diversion, but wanted to solve the iOS HTTPS (Type65) query problem, so I adapted a custom script for using a modified version of a list from oisd.nl.

Bash:
#!/bin/sh

logmsg() {
        logger -t "$(basename $0)" "$@"
        [ -t 1 ] && printf "%s\n" "$@"
}

logmsg "Starting adblock update"

[ -d /opt/share/oisd ] || mkdir -p /opt/share/oisd
[ -f /opt/share/oisd/whitelist ] || touch /opt/share/oisd/whitelist

cd /opt/share/oisd || exit 1

# Only download the file if it is newer on the server, or missing locally
if ! wget -N -q https://small.oisd.nl/dnsmasq2; then
        logmsg "oisd.nl download failed!"
        exit 1
fi

# Exit if the downloaded file is still older than the current local blocklist
if [ -f /opt/share/oisd/oisd.list ]; then
        if [ /opt/share/oisd/dnsmasq2 -ot /opt/share/oisd/oisd.list ]; then
                logmsg "No change in remote oisd list"
                exit
        fi
fi

# Reformat the list with address= commands and remove whitelist entries
if [ -f /opt/share/oisd/dnsmasq2 ]; then
        /bin/grep -E "^local=/[A-Za-z0-9._-]+/$" /opt/share/oisd/dnsmasq2 | \
        /bin/grep -E -v -i -f /opt/share/oisd/whitelist | \
        awk -F/ ' { printf "address=/%s/#\nlocal=/%s/\n", $2, $2 } ' > /tmp/oisd.new
else
        logmsg "No blocklist found after download!"
        exit 1
fi

# Test if dnsmasq has any problems with the new blocklist before promoting it to the live blocklist
if dnsmasq --test --conf-file=/tmp/oisd.new >/dev/null 2>&1; then
        logmsg "Restarting dnsmasq with updated blocking list"
        mv /tmp/oisd.new /opt/share/oisd/oisd.list
        service restart_dnsmasq
else
        logmsg "dnsmasq did not like the new file"
        exit 1
fi
In /jffs/scripts/dnsmasq.postconf:
Bash:
[ -s /opt/share/oisd/oisd.list ] && pc_append "conf-file=/opt/share/oisd/oisd.list" "$CONFIG"
 
Currently trialling this, working great thus far.


All Apple devices here, so installing a dns profile on each client is pretty much set & forget.

As always, YMMV.
 
I normally would have run Diversion, but wanted to solve the iOS HTTPS (Type65) query problem, so I adapted a custom script for using a modified version of a list from oisd.nl.

Bash:
#!/bin/sh

logmsg() {
        logger -t "$(basename $0)" "$@"
        [ -t 1 ] && printf "%s\n" "$@"
}

logmsg "Starting adblock update"

[ -d /opt/share/oisd ] || mkdir -p /opt/share/oisd
[ -f /opt/share/oisd/whitelist ] || touch /opt/share/oisd/whitelist

cd /opt/share/oisd || exit 1

# Only download the file if it is newer on the server, or missing locally
if ! wget -N -q https://small.oisd.nl/dnsmasq2; then
        logmsg "oisd.nl download failed!"
        exit 1
fi

# Exit if the downloaded file is still older than the current local blocklist
if [ -f /opt/share/oisd/oisd.list ]; then
        if [ /opt/share/oisd/dnsmasq2 -ot /opt/share/oisd/oisd.list ]; then
                logmsg "No change in remote oisd list"
                exit
        fi
fi

# Reformat the list with address= commands and remove whitelist entries
if [ -f /opt/share/oisd/dnsmasq2 ]; then
        /bin/grep -E "^local=/[A-Za-z0-9._-]+/$" /opt/share/oisd/dnsmasq2 | \
        /bin/grep -E -v -i -f /opt/share/oisd/whitelist | \
        awk -F/ ' { printf "address=/%s/#\nlocal=/%s/\n", $2, $2 } ' > /tmp/oisd.new
else
        logmsg "No blocklist found after download!"
        exit 1
fi

# Test if dnsmasq has any problems with the new blocklist before promoting it to the live blocklist
if dnsmasq --test --conf-file=/tmp/oisd.new >/dev/null 2>&1; then
        logmsg "Restarting dnsmasq with updated blocking list"
        mv /tmp/oisd.new /opt/share/oisd/oisd.list
        service restart_dnsmasq
else
        logmsg "dnsmasq did not like the new file"
        exit 1
fi
In /jffs/scripts/dnsmasq.postconf:
Bash:
[ -s /opt/share/oisd/oisd.list ] && pc_append "conf-file=/opt/share/oisd/oisd.list" "$CONFIG"
Uh nice, on my way to the US for work and did not bring along a router to test this on.
You‘re saying this works means it will be a feature for Diversion.
Thanks mate.
 
@Phil Mcavity

There once was a young Dr dentist named Malone
Who got a pretty young patient alone
And in his depravity
He filled the wrong cavity
And my how his practice has grown
🍀
☘️
 
Uh nice, on my way to the US for work and did not bring along a router to test this on.
You‘re saying this works means it will be a feature for Diversion.
Thanks mate.
@thelonelycoder

Sorry to bug you and i just ran into this by chance but Just curious if this feature will be implemented in the new Diversion update?

 
@thelonelycoder

Sorry to bug you and i just ran into this by chance but Just curious if this feature will be implemented in the new Diversion update?

It's the reason why it takes so long for this update. It affects much much more than just the few lines of (excellent) code by @dave14305 to bring Diversion up to speed.
 
It's the reason why it takes so long for this update. It affects much much more than just the few lines of (excellent) code by @dave14305 to bring Diversion up to speed.
I concur. You don't want to do Diversion a disservice by replacing it with such elegantly simple code. Diversion must maintain its standard that you have granularly developed over its life cycle. I think we all can appreciate that.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top