tanrax / maza-ad-blocking

Simple, native and efficient local ad blocker. Only Bash.
https://maza-ad-blocking.andros.dev/
Apache License 2.0
1.78k stars 64 forks source link

dnsmasq /127.0.0.1 bad option #20

Closed shivshankar3578 closed 1 year ago

shivshankar3578 commented 1 year ago

ζ brew info dnsmasq
==> dnsmasq: stable 2.89 (bottled)

Following installation steps give following error dnsmasq: bad option at line 4 of /Users/shivshankarsharma/.maza/dnsmasq.conf I tried to comment line 4 that is /127.0.0.1 then give me error for another line NOTE: I'm trying with URL_DNS_LIST="https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts"

tanrax commented 1 year ago

Share me your content of dnsmasq.conf that Maza generates.

codingCoffee commented 1 year ago

Facing the same issue with StevenBlack's host list

Here's the dnsmasq.conf which Maza generated: https://pastebin.com/Wu9T2DW0

tanrax commented 1 year ago

@codingCoffee @shivshankar3578 I see the problem. StevenBlack's host list format is not supported. The format is currently not supported. I will leave a warning note in the README. Perhaps a compatibility and status table would be needed. Thanks for the heads up.

tanrax commented 1 year ago

I have investigated further and it works with any other configuration that does not have the addresses in red.

bad-stevenblack

I suggest using any other Steve's list that does not have these headers.

StevenBlack commented 1 year ago

👋🏻 Hello everybody and Andros @tanrax here's a suggestion:

The lines highlighted in the image above ⬆️ are common, in whole or in part, to all hosts files. Rules to handle this would be a small finite set. Just 14 lines covers all OEM hosts files shipped with Windows OS (current and historical) as well as all hosts versions shipped with the various Linux OS.

Since the set if finite and bounded, I'm suggesting you could filter those lines as part of any pre-processing and validation you may be doing already.

tanrax commented 1 year ago

@StevenBlack have uploaded an update. The domains in the highlighted list will now be ignored by default. I have also added improvements to make "Steven Black's main list" or any other similar list work better. To make it work:

Happy hacking!

sbstn87 commented 1 year ago

Is is just me, or now the Steven Black's list is enabled by default?

tanrax commented 1 year ago

@sbstn87 Use Yoyo by default. If you want to use Steven Black's list, see the README for instructions on how to make this possible. You only have to modify one line 😉