How bet-blocker/bet-blocker works
Project type and purpose
• BetBlocker is a standalone Python utility (proof-of-concept) that blocks access to online gambling sites on a local machine by modifying firewall rules and the hosts file. It is not a client-server or web application but a desktop/CLI tool.
File structure
• Top-level scripts and config:
• main.py – application entry point
• requirements.txt / pyproject.toml – Python dependencies
• blocklist.txt – list of domains to block
• hosts – template or backup hosts file
• Business logic under src/:
• src/functions/blocker.py – orchestrates block and unblock operations
• src/functions/firewall.py – applies OS firewall rules
• src/functions/deprecated_functions.py – legacy utilities
• src/utils/… – helpers for path resolution and logging
• Support code:
• app/ – UI styling (if any GUI is introduced)
• scripts/remove_duplicates.py – cleans blocklist
• _cicd/avoid_dup_bet.py + .github/workflows – CI/CD script to prevent duplicate entries
• Documentation:
• page/index.md – project docs
Insights from the README
• Core features:
• Block by firewall IP filtering
• Block by editing the hosts file
• “Rede de Apoio” (support network) extension point
• Target platforms: Windows & Linux
• Installation: pip install & run main.py