tanrax / maza-ad-blocking

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

Question about hosts file and DNSMASQ #13

Closed ghost closed 2 years ago

ghost commented 2 years ago

Hi @tanrax, Thanks a lot for the code; seems very useful. Two questions that I cannot find the answer to:

tanrax commented 2 years ago

Hello @TommieWong , regarding the first question, if you want to have an optimal filtering you need a DNS server working locally with the mentioned configuration. Regarding your VPN, you can tell it in the configuration to use the DNS server in the local address: 127.0.0.1 (that's how I have it). Maza adds a customisation in the hosts file in case you don't use a DNS server, you can add whatever you need inside. In case you use a DNS server, you must add it in its own configuration. I hope I have answered your questions. Thanks for your comments.

ghost commented 2 years ago

Hi @tanrax, thanks for the replies, this is useful. I hadn't looked at the whole hosts file and have now seen the part that Maza adds. Two more questions, if you will:

tanrax commented 2 years ago

@TommieWong Hello again! If you read the script you will see that everything comes directly from Peter Lowe (https://pgl.yoyo.org/adservers/). I don't change a comma. If you want another list, just change the url. By the way... it's not a good idea to point to 0.0.0.0 if you use a DNS server. Best regards. If you want me to continue to expand it, help is welcome: https://ko-fi.com/androsfenollosa Thank you!

ghost commented 2 years ago

Ahah, "it's not a good idea to point to 0.0.0.0" is quite a tease. Thanks for the help!