Local ad blocker. Like Pi-hole but local and using your operating system.
Go to file
dependabot[bot] 082e697125
Bump lodash from 4.17.15 to 4.17.19 in /docs
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-20 05:52:56 +00:00
docs Bump lodash from 4.17.15 to 4.17.19 in /docs 2020-07-20 05:52:56 +00:00
media Add files via upload 2020-03-30 08:58:15 +02:00
LICENSE Initial commit 2020-01-03 07:41:49 +01:00
maza Fixbug remove hosts 2020-03-21 21:33:42 +01:00
README.md Fixes Typos 2020-05-09 16:38:13 +02:00

🥇 Maza was Top 1 in Hacker News

Comments: https://news.ycombinator.com/item?id=22717650

Maza ad blocking - Like Pi-hole but local and using your operating system

demo

Simple, native and efficient local advertising blocker. Compatible with macOS and Linux.

maza logo
  • You don't have to install any browser extensions or applications, you just use the tools of your operating system.
  • You update the list of DNS to be blocked with a single command.
  • Opensource.
  • Just bash.

🏃Run

📡 Update database

maza update 

🔨 Start

sudo maza start 

🛠 Stop

sudo maza stop 

⚖️ Status

maza status 

⚙️ Install

👀 Requirements

  • bash 4.0 or higher
  • curl
  • Only macOS users, gsed: brew install gnu-sed

Then you do this.

curl -o maza https://raw.githubusercontent.com/tanrax/maza-ad-blocking/master/maza && chmod +x maza && sudo mv maza /usr/local/bin

Optional but recommended, make a backup of your hosts file.

sudo cp /etc/hosts /etc/hosts.backup

🔪 Uninstall

sudo rm /usr/local/bin/maza && sudo rm -r ~/.maza

DNSMASQ

Unfortunately the hosts file does not support sub-domains (wildcards), which is necessary to correctly filter all DNS. You will need to install locally a server for that purpose, Maza supports the Dnsmasq format. Here's an example for macOS.

1 Install

brew install dnsmasq

2 Configure

Edit the file.

/usr/local/etc/dnsmasq.conf

Add the following lines.

conf-file=(your user path)/.maza/dnsmasq.conf

Start DNSMASQ.

sudo brew services stop dnsmasq
sudo brew services start dnsmasq

3 Tell your OS to use your DNS server

Delete the list of macOS DNS servers and add the 3 addresses. The first one will be your local server, and the other 2 belong to OpenDNS, which you can use any other.

127.0.0.1
208.67.222.222
208.67.220.220
network macos

Refresh your DNS cache

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Bonus: dnsmasq is in charge of solving all DNS

Add in configure file: /usr/local/etc/dnsmasq.conf

no-resolv
server=208.67.222.222
server=208.67.220.220

Bonus: dnsmasq have test domains

If you want all your .localhost domains, for example, point to localhost add in configure file: /usr/local/etc/dnsmasq.conf

address=/.localhost/127.0.0.1

⚠️ CAUTION

  • Only compatible with Linux and macOS operating systems.
  • Remember to make a backup copy of /etc/hosts in case of unforeseen circumstances, neither the project nor its author will be responsible for any possible repercussions derived from not carrying out this action.

🧑‍🎨 Credits

Andros Fenollosa