ghostersk / catchall-webbrowsing

Flask app for catching web requests and recording them, used for custom Blocking Mode with Adguard Home
GNU General Public License v3.0
0 stars 0 forks source link
adguardhome

catchall-webbrowsing for Adguard Home

Flask app for catching web requests and recording them I have created this app to redirect all blocked DNS queries from Adguard Home, to the ip of docker container. The app will record what website was used, and it will also return information the website was blocked.

EDIT: There is an issue when the website tries to go to https, as it has infinit posibilities for domain names, you would need certificate for all of them trusted on your devices. At this time, I do not see option how to fix this. Idea was to convert HTTPS to HTTP on initial contact but that does not work. https://github.com/ghostersk/catchall-webbrowsing/issues/1

The application is started by using startup.sh

#!/bin/bash
pip install -r requirements.txt

export FLASK_RUN_EXTRA_FILES="startup.sh"
export FLASK_DEBUG=True
export FLASK_RUN_HOST="0.0.0.0"
export FLASK_RUN_PORT=80

flask run & python app.py

This will first run the app on port 80 and all interfaces and last command it will run on the port 443 as per the app.py code

This app is using Interactive Bootstrap 5 DataTables for easier data lookup. Screenshot_20240518_203638

List all blocked attempts

Screenshot_20240518_190418

You can deploy it with docker-compose, as per the docker-compose.yml example I am using static IP address of the catchall container to send all blocked queries there from Adguard Home in DNS Settings: Screenshot_20240329_125519

On end to make sure you do not have to confirm invalid SSL certificate, I have added custom domain (in app.py update the webblocker_host , what can be set to anything and then you just need to use for example Nginx Proxy to point the url with valid SSL or with HTTP only to the ip where this Catchall is running. image