A powerful website blocker application with a retro terminal interface for Linux systems, designed to help you manage digital distractions and boost productivity.
- 🚫 Block websites during specified time periods
- ⏰ Set custom blocking schedules for each website
- ⏸️ Temporary pause blocking (up to 15 minutes, max 2 times per day)
- 🖥️ Retro terminal-style interface
- 🔒 System-level blocking using hosts file
- 🔄 Real-time updates and monitoring
- Linux operating system
- Python 3.6+
- Node.js 14+
- Root access (for modifying hosts file)
- Clone the repository:
git clone https://github.com/Andebugulin/ArchWebBlocker.git
cd ArchWebBlocker- Set up the backend:
cd backend
pip install -r requirements.txt- Set up the frontend:
cd frontend
npm install- Start the backend server (requires root privileges):
sudo python3 archblocker.py- Start the frontend development server:
cd frontend
npm run dev- Open your browser and navigate to
http://localhost:5173
The application provides a terminal-style interface with the following commands:
-
add <website> <startTime> <endTime>- Add a website to block- Example:
add facebook.com 09:00 17:00
- Example:
-
remove <website>- Remove a website from blocking- Example:
remove facebook.com
- Example:
-
pause <website> [minutes]- Temporarily pause blocking- Example:
pause instagram.com 5
- Example:
-
list- Show all blocked websites -
refresh- Refresh website list -
status- Check service status -
clear- Clear terminal -
help- Show available commands
To ensure ArchBlocker runs automatically on system startup, you can create a systemd service:
- Create a service file:
sudo nano /etc/systemd/system/archblocker.service- Add the following content:
[Unit]
Description=ArchBlocker Website Blocker
After=network.target
[Service]
Type=simple
User=root
ExecStart=/usr/bin/python3 /path/to/your/archblocker.py
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target- Enable and start the service:
sudo systemctl daemon-reload
sudo systemctl enable archblocker
sudo systemctl start archblocker- Check service status:
sudo systemctl status archblocker- View logs:
sudo journalctl -u archblocker -f- Built with Flask and Python
- Manages the hosts file for system-level website blocking
- Implements pause functionality with daily limits
- Includes rotating log system for debugging
- Built with React and Vite
- Uses Tailwind CSS for styling
- Features a terminal-style interface using Lucide React icons
- Real-time communication with backend API
- The application requires root privileges to modify the hosts file
- The API server runs on localhost only
- Uses file immutability protection for the hosts file
- Implements input validation for all commands
- Only works on Linux systems
- Requires root access
- Blocking can be bypassed by clearing DNS cache
Contributions are welcome! Please feel free to submit a Pull Request.
This project is unlicensed

