SmartBrowser is a lightweight Windows tool that automatically opens websites in the correct Chrome profile (VPN or No-VPN) based on real network reachability. It’s ideal for environments with restricted access, where some sites require VPN and others work best without it.
- Automatic routing
- Blocked sites → VPN profile
- Local sites → No-VPN profile
- Network-aware
- Real TCP reachability tests
- No static domain lists
- Chrome profile support
- Keeps Google account, passwords, bookmarks, and extensions separate per profile
- Fast & cached
- Routing decisions cached with TTL for instant performance
- Search-friendly
- Single words → Google search
- Domains → direct navigation
- Windows integration
- Can be set as the default browser
- Safe & reversible
- No Chrome hacks, no cookie sharing, no registry changes
User clicks a link
↓
SmartBrowser.exe
↓
Normalize input (URL or search)
↓
Check cache
↓
Network reachability test
↓
Decide profile: VPN or No-VPN
↓
Launch Chrome with correct profile text
smart_browser/
├── main.py
├── config.py
├── utils.py
├── network.py
├── decision.py
├── launcher.py
├── cache.py
├── profiles.py
├── route_cache.json
├── README.md
- Python 3.10+ (for development)
- Windows 10+
- Google Chrome with two profiles:
- One with VPN extension enabled
- One without VPN extension
Edit config.py:
PROFILES = {
"vpn": "Profile 2",
"no_vpn": "Default"
}python main.py github.com
python main.py example.ir
python main.py googleBehavior examples:
Input,Outcome github.com,Opens in VPN profile (blocked) example.ir,Opens in No-VPN profile (local) google,Performs Google search
- Open Settings → Apps → Default apps
- Scroll down and click Choose defaults by app
- Select SmartBrowser
- Assign it to HTTP, HTTPS, .htm, .html
Now all web links will automatically route through SmartBrowser.
No packet inspection or credential access
- Uses Chrome’s native profile isolation
- VPN / No-VPN state is defined only by your Chrome profiles
- Fully reversible – just reset default browser to Chrome
- Chrome profiles cannot share live sessions (by design)
- VPN detection is profile-based (manual mapping in config)
- First visit to a new domain may take ~0.5s (subsequent visits are cached and instant)
- System tray app with status icon
- Auto-start on Windows login
- Manual override hotkey (force VPN / No-VPN)
- Per-domain pinning
- Logging & diagnostics
MIT License
Soroush Bazgir – Built for seamless network routing under restricted environments.