mirror of
https://github.com/tanrax/maza-ad-blocking.git
synced 2025-07-04 19:35:43 +02:00
Compare commits
9 Commits
a592716528
...
master
Author | SHA1 | Date | |
---|---|---|---|
32747144b7 | |||
9c3d08e8ee | |||
8405aa6edc | |||
61568c57ec | |||
e32584b978 | |||
b2a4d7217b | |||
3bbb0fe23a | |||
ac9fe2a3df | |||
19ede6d147 |
29
README.md
29
README.md
@ -28,6 +28,7 @@ Simple, native and efficient **local ad blocker**. Bash script compatible with *
|
||||
|
||||
- [Commands](#-commands)
|
||||
- [Install or update](#%EF%B8%8F-install-or-update)
|
||||
- [Check if you block ads](#-check-if-you-block-ads)
|
||||
- [Auto update of domains to be blocked](#-auto-update-of-domains-to-be-blocked)
|
||||
- [Uninstall](#-uninstall)
|
||||
- [Not blocking certain domains](#-not-blocking-certain-domains)
|
||||
@ -35,6 +36,9 @@ Simple, native and efficient **local ad blocker**. Bash script compatible with *
|
||||
- [Alternative DNS list](#-alternative-dns-list)
|
||||
- [DNSMASQ (or support sub-domains: wildcards)](#dnsmasq)
|
||||
- [Create your own Pi-Hole](#-create-your-own-pi-hole-server-with-maza)
|
||||
- [Projects inspired by Maza](#user-content-️-projects-inspired-by-maza)
|
||||
- [Donations](#-buy-me-a-coffee)
|
||||
- [Community or questions](#-get-help-or-talk-with-the-community)
|
||||
|
||||
## 📟 Commands
|
||||
|
||||
@ -82,6 +86,25 @@ Optional but recommended, make a backup of your hosts file.
|
||||
sudo cp /etc/hosts /etc/hosts.backup
|
||||
```
|
||||
|
||||
## 🧪 Check if you block ads
|
||||
|
||||
You can run a test to see if the domains are blocked.
|
||||
|
||||
For example, you can run the following command.
|
||||
|
||||
``` bash
|
||||
curl googleadservices.com
|
||||
```
|
||||
|
||||
If you get an error like this, it means that the domain is blocked.
|
||||
|
||||
``` shell
|
||||
curl: (7) Failed to connect to googleadservices.com port 80 after 2 ms: Could not connect to server
|
||||
```
|
||||
|
||||
But if you get a response with HTML, it means that the domain is not blocked (maybe a 404 error).
|
||||
|
||||
|
||||
## 🤖 Auto update of domains to be blocked
|
||||
|
||||
Open your `cron`.
|
||||
@ -349,12 +372,16 @@ ssh customer@andros.dev -p 5555
|
||||
|
||||
## 💬 Get Help or talk with the community
|
||||
|
||||
[Jabber/XMPP](xmpp:maza-ad-blocking@groups.im.andros.dev/?join)
|
||||
- [IRC: #maza-ad-blocking on irc.libera.chat](ircs://irc.libera.chat:6697/maza-ad-blocking)
|
||||
- [Fediverse/Mastodon](https://activity.andros.dev/@andros)
|
||||
|
||||
## 🍓 CREATE YOUR OWN PI-HOLE SERVER WITH MAZA
|
||||
|
||||
You can easily create your own DNS server on a Raspberry Pi, VPS or wherever you want, to connect your devices in just 10 commands thanks to Maza. Follow the [tutorial](https://programadorwebvalencia.com/create-your-own-pi-hole-with-10-commands/).
|
||||
|
||||
## 🎖️ Projects inspired by Maza
|
||||
|
||||
- [adless](https://github.com/WIttyJudge/adless)
|
||||
|
||||
## ⚠️ CAUTION
|
||||
|
||||
|
35
docker/Dockerfile
Normal file
35
docker/Dockerfile
Normal file
@ -0,0 +1,35 @@
|
||||
# Dockerfile
|
||||
FROM debian:slim
|
||||
|
||||
# Set environment variables
|
||||
ENV URL_DNS_LIST_CUSTOM=""
|
||||
ENV MAZA_DIR="/etc/maza"
|
||||
ENV MAZA_SCRIPT="/usr/local/bin/maza"
|
||||
|
||||
# Install dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
dnsmasq \
|
||||
curl \
|
||||
bash \
|
||||
cron \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Add the maza script
|
||||
COPY maza $MAZA_SCRIPT
|
||||
RUN chmod +x $MAZA_SCRIPT
|
||||
|
||||
# Configure dnsmasq
|
||||
RUN mkdir -p "$MAZA_DIR" \
|
||||
&& echo "conf-file=$MAZA_DIR/dnsmasq.conf" >> /etc/dnsmasq.conf
|
||||
|
||||
# Configure cron to update the maza list daily
|
||||
RUN echo "@daily $MAZA_SCRIPT update" >> /etc/cron.d/maza-cron \
|
||||
&& chmod 0644 /etc/cron.d/maza-cron \
|
||||
&& crontab /etc/cron.d/maza-cron
|
||||
|
||||
# Expose necessary ports
|
||||
EXPOSE 53/udp 53/tcp 67/udp
|
||||
|
||||
# Start dnsmasq and cron
|
||||
CMD service cron start && dnsmasq -k
|
9
docker/README.md
Normal file
9
docker/README.md
Normal file
@ -0,0 +1,9 @@
|
||||
# EXPERIMENTAL!
|
||||
|
||||
## This is a new feature and still under development. Use at your own risk.
|
||||
|
||||
Download `compose.yaml` and `Dockerfile` to your project directory.
|
||||
|
||||
```sh
|
||||
docker compose up -d --build
|
||||
```
|
13
docker/compose.yaml
Normal file
13
docker/compose.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
services:
|
||||
maza_dns:
|
||||
build: .
|
||||
container_name: maza_dns
|
||||
environment:
|
||||
#- URL_DNS_LIST_CUSTOM="https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts"
|
||||
ports:
|
||||
- "53:53/udp"
|
||||
- "53:53/tcp"
|
||||
- "67:67/udp"
|
||||
volumes:
|
||||
- maza_data:/etc/maza
|
||||
restart: unless-stopped
|
Reference in New Issue
Block a user