2 ms·
Urgh why do people have to be so POSIX about things. Here is the content of my /etc/cron.daily/adblock file: #!/bin/bash wget -qO- https://raw.github
by oliwarner 10y ago
Urgh why do people have to be so POSIX about things. Here is the content of my /etc/cron.daily/adblock file:
#!/bin/bash
wget -qO- https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts \
| sort -u \
| awk '/^0/ {print;print ":: " $2}' \
> /tmp/ad-hosts
service dnsmasq reload
I know cycles are cheap but that doesn't mean we should be spaffing them up the wall when we can do things cheaper. This avoids double-processing the downloaded content.
dnsmasq config as above.
- neurostimulant 10y agoHow is the performance of dns lookup when using dnsmasq? Is it faster than putting them on /etc/hosts? I tried putting the blocked domains in the /etc/hosts file, but the performance is terrible. It significantly increased dns lookup time on my i5 laptop (that was before I upgraded my laptop with ssd though), so I ended up configuring my own ad blocking dns server on a cheap Scaleway vps instead and never have any issue with long dns lookup anymore.