From 29220010f9cc1238fbbaa0b8e20b7bfdf53cce0f Mon Sep 17 00:00:00 2001 From: bmartin Date: Wed, 3 Jun 2026 16:29:02 -0500 Subject: [PATCH] Update README.md --- README.md | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1a48aa5..ee64561 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,71 @@ -# Adguard_Block +# AdGuard Block Page +A custom AdGuard Home blocking page that notifies users when a domain has been blocked and gives them a Tetris game to pass the time. + +## Features + +- Displays the blocked domain name to the user +- Retro terminal aesthetic +- Fully playable Tetris game embedded in the page +- Leaderboard to track high scores + +## Stack + +- Python / Flask +- SQLite (leaderboard scores) +- Apache with mod_wsgi + +## Setup + +### Prerequisites + +- Python 3 +- Apache with mod_wsgi +- AdGuard Home configured to redirect blocked domains to this page + +### Installation + +```bash +sudo mkdir -p /opt/flaskapp +sudo python3 -m venv /opt/flaskapp/venv +sudo /opt/flaskapp/venv/bin/pip install flask +``` + +Copy files: +```bash +sudo cp app.py /opt/flaskapp/ +sudo cp app.wsgi /opt/flaskapp/ +sudo cp -r templates /opt/flaskapp/ +``` + +### Apache Configuration + +Add a `WSGIScriptAlias` in your Apache config pointing to `app.wsgi`: + +```apache +WSGIScriptAlias /blocked /opt/flaskapp/app.wsgi + + + WSGIProcessGroup flaskapp + WSGIApplicationGroup %{GLOBAL} + Require all granted + +``` + +### AdGuard Home Configuration + +In AdGuard Home, set the **Custom blocking page** URL to: + +``` +http://192.168.1.189/blocked?domain=%DOMAIN% +``` + +## Project Structure + +``` +flaskapp/ +├── app.py # Flask app +├── app.wsgi # Apache mod_wsgi entry point +└── templates/ + └── blocked.html # Blocking page with Tetris +```