No first member, 4 team members:
Brownie Tran Raymond Yang Yang Li Davi Vargas
A powerful Windows application designed to help you stay focused by blocking distracting websites and applications during timed work sessions
Option 1: Download Pre-built Executable (Recommended)
- Download FocusDock.zip from Latest Release
- Unzip it anywhere
- Run
app.exe
Option 2: Run from Source
- Install Python 3.8+
- Run
python -m venv .venv - Run
.venv\Scripts\Activate.ps1 - Run
pip install PyQt6 psutil pyinstaller - Run
pyinstaller --onefile --name app --add-data "blocklist.json;." --add-data "tasks.json;." app.py - Run
pyinstaller --onefile --name mvp_blocker --add-data "blocklist.json;." mvp_blocker.py - cd /dist folder
- Run
app.exe.
- Customizable countdown timer with hours, minutes, and seconds
- Visual progress indicator with circular progress arc
- Click-to-edit time - Click on the timer to adjust duration
- Selective blocking - Choose which websites and apps to block
- Toggle all - Quickly enable/disable all blocks at once
- HTTP/HTTPS support - Blocks websites via local proxy (HTTP & SOCKS5)
- App blocking - Automatically terminates blocked applications
- Pattern matching - Use wildcards to block entire domains (e.g.,
*.facebook.com)
- Built-in task list to track your goals
- Add/complete tasks with descriptions
- Auto-delete - Completed tasks automatically disappear
- Persistent storage - Tasks saved to
tasks.json
- PAC (Proxy Auto-Configuration) - System-wide blocking via Windows proxy settings
- Multi-layer blocking - HTTP proxy (port 3128) + SOCKS5 proxy (port 1080)
- App termination modes:
- Polite mode: Graceful termination
- Strict mode: Force kill if app doesn't close
- Real-time monitoring - Continuous scanning for blocked apps
- Windows 10 or Windows 11 (Required for PAC configuration and app blocking)
- Administrator privileges (to modify Windows proxy settings)
No installation required! Just download and run.
-
Download the application
- Get
FocusDock.zipfrom GitHub Releases - Extract to any folder (e.g.,
C:\FocusDock\)
- Get
-
Verify extracted files
FocusDock/ βββ app.exe # Main application βββ mvp_blocker.exe # Blocking engine βββ blocklist.json # Website/app configuration βββ tasks.json # Task list -
Launch the app
- Double-click
app.exe - Done! Start your first focus session.
- Double-click
What you need to install:
- Python 3.8 or higher (Download here)
- PyQt6 - GUI framework
- psutil - Process monitoring library
Setup steps:
-
Install Python
- Download from python.org
β οΈ Important: Check "Add Python to PATH" during installation
-
Clone the repository
git clone https://github.com/Yang-Raymond/HttpHacks.git cd HttpHacks -
Install required packages
python -m venv .venv .venv\Scripts\Activate.ps1 pip install PyQt6 psutil pyinstaller
Troubleshooting: If
pyinstallercommand is not found, usepython -m PyInstallerinstead -
Compile the application a. Build the main application:
pyinstaller --onefile --name app --add-data "blocklist.json;." --add-data "tasks.json;." app.py
b. Build the blocker engine:
pyinstaller --onefile --name mvp_blocker --add-data "blocklist.json;." mvp_blocker.pyTroubleshooting: If
pyinstallercommand is not found, usepython -m PyInstallerinstead -
Move to the correct directory
cd dist -
Copy and Paste "blocklist.json" and "tasks.json" to dist folder
-
Run the application
.\app.exe
When you open Focus Dock, you'll see three panels:
Left Panel: Choose what to block (websites & apps)
Middle Panel: Set timer and start/stop blocking
Right Panel: Track your tasks during the session
The left panel shows a pre-loaded list of common distractions:
- YouTube, Netflix, Discord, Steam, League of Legends, etc.
To enable blocking:
- Toggle ON the websites/apps you want to block
- Tip: Use "Toggle All" at the top to quickly enable everything
- Search bar: Type to filter the list (e.g., "D" shows "Discord, Disney")
Usually unblocked by default:
- Social media (Facebook, Instagram, Twitter, TikTok)
- Streaming (YouTube, Netflix, Twitch)
- Gaming platforms (Steam, Discord, League of Legends)
To add your own distraction:
- Click "Add website" or "Add app" at the bottom
- We'll cover this in detail later
- Click on the timer in the center (shows
00:00:00) - A dialog will pop up with scrollable numbers
- Set your time:
- For beginners: Try 00:25:00 (25 minutes)
- Scroll or type the numbers
- Click "OK"
In the right panel:
- Click the "+" button
- Enter what you want to accomplish:
- Task name: "Study Chapter 5"
- Description: "Pages 120-145, take notes"
- Click "Add Task"
- Repeat for more tasks
-
Click the big blue "Focus" button in the center
-
What happens:
- Button changes to "Stop"
- Timer starts counting down
- Blocking activates immediately
- Left panel locks (can't change during session)
-
Test it: Try visiting a blocked site or an app
- Open your browser
- Go to youtube.com or facebook.com
- You should see the website isn't working
Or
- Open the Discord app
- You should see that you can't launch Discord app
While the timer is running:
- β Check off tasks as you complete them (they disappear automatically)
- β Watch the progress arc around the timer
- β Cannot change blocklist (prevents cheating!)
If you need to stop early:
- Click "Stop" button
- Blocking ends immediately
- Close and reopen browser to access blocked sites
When the timer reaches 00:00:00:
- Blocking automatically stops
- You'll hear/see a completion indicator
- All websites/apps are accessible again
- Take a break! (Or start another session)
- Click "Add website" in the left panel
- Fill in the form:
- Name:
LinkedIn(display name) - URLs:
linkedin.com, *.linkedin.com(comma-separated)
- Name:
- Click "Add"
URL Pattern Tips:
youtube.comβ blocks only youtube.com*.youtube.comβ blocks all subdomains (m.youtube.com, music.youtube.com)*.facebook.com, *.instagram.comβ block multiple at once
Common patterns:
-
Add websites/apps to block
- Click "Add website" or "Add app" in the left panel
- Enter the website name and URL patterns (e.g.,
facebook.com, *.facebook.com) - For apps, enter the executable name (e.g.,
discord,steam)
-
Toggle blocking
- Use individual toggles to enable/disable specific blocks
- Use "Toggle All" to quickly enable/disable everything
-
Set your timer
- Click on the timer display
- Scroll or type to set hours, minutes, and seconds
- Click "OK" to confirm
-
Start focusing
- Click the "Focus" button
- Blocked websites and apps will be inaccessible during the session
- Click "Stop" to end the session early
-
Track your tasks
- Add tasks using the "+" button in the right panel
- Check off tasks as you complete them
- Completed tasks automatically disappear
Stores website and app blocking configuration:
{
"websites": {
"Facebook & Meta": {
"blocked": true,
"apps": "",
"urls": ["*.facebook.com", "facebook.com", "*.instagram.com"]
},
"Discord": {
"blocked": false,
"apps": "discord*",
"urls": ["discord.com", "*.discord.com"]
}
}
}Stores your task list:
{
"tasks": [
{
"label": "Complete project documentation",
"description": "Write comprehensive README",
"completed": false
}
]
}- PAC Server: Runs on
localhost:18080serving proxy auto-config - HTTP Proxy: Listens on
127.0.0.1:3128for HTTP/HTTPS traffic - SOCKS5 Proxy: Listens on
127.0.0.1:1080as fallback - System Integration: Modifies Windows registry to enable PAC
- Request Filtering: Matches domains against blocklist and blocks/allows accordingly
- Process Scanning: Scans running processes every 1-2 seconds
- Pattern Matching: Uses wildcards to match process names (e.g.,
discord*) - Termination:
- Polite mode: Sends SIGTERM and waits
- Strict mode: Sends SIGTERM, waits 2 seconds, then SIGKILL if needed
- System Protection: Never touches critical system processes
All blocking activity is logged to logs/traffic.log:
2025-11-09 14:30:15 CONNECT facebook.com:443 BLOCK
2025-11-09 14:30:20 APP discord.exe TERMINATE rule=discord*
HTTPHacks/
βββ app.py # Main entry point
βββ mvp_blocker.py # Core blocking engine (proxy + app blocker)
βββ blocklist.json # Website/app blocking configuration
βββ tasks.json # Task list storage
βββ UI/ # User interface components
β βββ main_window.py # Main application window
β βββ clock_widget.py # Timer display and controls
β βββ task_panel.py # Task management panel
β βββ blocklist_manager.py # Blocklist data management
β βββ toggle_switch.py # Custom toggle switch widget
β βββ website_toggle_widget.py # Website/app toggle row
β βββ time_edit_dialog.py # Time picker dialog
β βββ scroll_number_widget.py # Scrollable number input
β βββ add_website_dialog.py # Add website dialog
β βββ add_app_dialog.py # Add app dialog
β βββ task_input.py # Task input form
β βββ task_item.py # Individual task widget
βββ logs/ # Traffic and blocking logs
- Check browser: Close and reopen browser after starting focus session
- Clear browser cache: Some browsers cache DNS/connections
- Verify PAC: Check Windows proxy settings (
Internet Options > Connections > LAN Settings) - Try incognito mode: Private browsing doesn't use cached connections
- Check app settings: Some apps have auto-restart features
- Administrator rights: Run the app as administrator for better process control
- Run manually:
python mvp_blocker.py --disable-pac-only - Check registry:
HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings
The mvp_blocker.py script can be run standalone with options:
python mvp_blocker.py [options]Options:
--proxy-port PORT- HTTP proxy port (default: 3128)--socks-port PORT- SOCKS5 proxy port (default: 1080)--pac-port PORT- PAC server port (default: 18080)--enable-pac- Enable system PAC configuration--disable-pac- Disable PAC configuration on exit--disable-pac-only- Only disable PAC and exit--blocklist FILE- Path to blocklist JSON (default: blocklist.json)--log FILE- Path to log file (default: logs/traffic.log)--app-mode MODE- App blocking mode: polite or strict (default: strict)--app-grace SECONDS- Grace period before force kill (default: 2.0)--app-scan SECONDS- Process scan interval (default: 2.0)--app-dry-run- Log only, don't terminate apps
- UI Components: Add to
UI/directory following the existing pattern - Blocklist Manager: Extend
UI/blocklist_manager.pyfor new data operations - Blocking Logic: Modify
mvp_blocker.pyfor proxy/app blocking changes
- Local only: All proxies run on localhost (127.0.0.1)
- No external connections: Blocking is done locally
- No data collection: Nothing is sent to external servers
- Open source: Full code transparency