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

Will this work on windows with git-bash and a few tweaks? #4

Closed fornof closed 4 years ago

fornof commented 4 years ago

Hello, I was wondering if this can be used on windows: hosts file is here: c:\windows\system32\drivers\etc\hosts There are probably some other tweaks? curl runs, and bash scripts run in git bash.

tanrax commented 4 years ago

I don't work with Windows, I don't know if it would be possible. I'm sorry...

fornof commented 4 years ago

I'm looking into it: https://hub.docker.com/r/sameersbn/bind/ << this can be used instead of dnsmasq possibly as a dns server.

fornof commented 4 years ago

It looks like the list of dns forwards like pihole come from https://pgl.yoyo.org/adservers/serverlist.php?showintro=0&mimetype=plaintext , This code seems like a wrapper for dnsmasq. Technically, the dns forwards list just needs to be put into the dns server, and the dns server needs to be pointed to in the network.

tanrax commented 4 years ago

Great. If it works for you, please let me know. So I can include it in the README

fornof commented 4 years ago

Hello @tanrax , I found there is a docker container of pihole which means it can run on anything. I tried it and it works in a docker container on windows just fine! pihole docker steps: (prereq: install docker)

  1. setup your docker-compose.yml file with the one listed on pihole page (starts with version: '3').
  2. save and do docker-compose up -d
  3. do docker ps and ensure your pihole is running.
  4. Go to network settings and set your DNS to 127.0.0.1 and ::1 like this:
  5. if the docker container is ever stopped, you will need to reverse the setup step 4 to get back internet.
tanrax commented 4 years ago

Thank you for your research efforts. The problem with using the pi-hole docker is that pi-hole already does Maza's job, and performance and simplicity are lost. Maybe the easiest thing in Windows would be to mount a clean docker.