A simple Rust-based blocklist API.
It checks and maintains a list of domains and IPs that should be blocked.
- Fetches blocklists from multiple sources\
- Stores them locally\
- Provides a simple HTTP server to serve the blocklist\
- Can be easily deployed on any Linux server, including ARM devices like Orange Pi Zero 3
- Can be run automatically at system boot using systemd
git clone https://github.com/finotilucas/pihole-blocklist.git
cd pihole-blocklist- For native Linux (x86_64):
cargo build --release- For ARM64:
rustup target add aarch64-unknown-linux-gnu
sudo apt update && sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
cargo build --release --target aarch64-unknown-linux-gnu- Native Linux:
./target/release/pihole-blocklist- ARM64:
./target/aarch64-unknown-linux-gnu/release/pihole-blocklist- Run the script in the root of the project
run.sh:
chmod +x run.sh- Create the systemd service:
sudo nano /etc/systemd/system/pihole-blocklists.service- Paste the following:
[Unit]
Description=Pi-hole Blocklists Rust Service
After=network.target
[Service]
Type=simple
User=orangepi
WorkingDirectory=/home/orangepi/Github/pihole-blocklists-rs
ExecStart=/home/orangepi/Github/pihole-blocklists-rs/run.sh
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target- Enable and start the service:
sudo systemctl daemon-reload
sudo systemctl enable pihole-blocklists
sudo systemctl start pihole-blocklists- Check the status:
sudo systemctl status pihole-blocklistsLogs can be monitored with:
journalctl -u pihole-blocklists -fMIT License