A macOS menu bar app that blocks adult content at the system level.
CleanBrowse is a lightweight macOS menu bar application that provides system-level protection against adult content. It runs quietly in the background, blocking access to inappropriate websites across all browsers and applications on your Mac.
- System-wide blocking — Blocks ~249,000 adult domains via
/etc/hostsmodification - DNS Proxy — Intercepts DNS queries system-wide using a Network Extension, preventing bypass through alternative DNS or encrypted DNS
- Forced SafeSearch — Enforces SafeSearch on Google, YouTube, Bing, and DuckDuckGo across ~190 country-code domains
- Custom domain blocking — Add your own domains to the blocklist through the menu bar UI
- Anti-bypass riddle — Requires solving a riddle before the app can be quit, adding friction against impulsive disabling
- Launch at login — Automatically starts with your Mac
- Minimal footprint — Lives in the menu bar with no Dock icon or main window
CleanBrowse uses a three-layer blocking strategy:
| Layer | Method | What it does |
|---|---|---|
| Hosts file | /etc/hosts rewrite |
Redirects blocked domains to 127.0.0.1 |
| DNS Proxy | NEDNSProxyProvider |
Intercepts all DNS query types (A, AAAA, HTTPS/SVCB) and returns NXDOMAIN for blocked domains |
| SafeSearch | IP-level redirect | Forces search engines to use their SafeSearch/restricted mode IPs |
- macOS 14 (Sonoma) or later
- Admin password (required on first launch to modify
/etc/hosts)
Download the latest .zip from the Releases page, unzip it, and move CleanBrowse.app to your Applications folder.
- Clone the repository:
git clone https://github.com/EngOmarElsayed/CleanBrowse.git
- Open
CleanBrowse.xcodeprojin Xcode - Build and run (requires an Apple Developer account for the Network Extension entitlement)
- Launch CleanBrowse — it appears as a shield icon in the menu bar
- On first launch, you'll be prompted for your admin password to apply the blocklist
- The DNS proxy activates automatically
- To add custom domains, click the menu bar icon and type a domain in the input field
- To quit, click the power icon — you'll need to solve a riddle first
- SwiftUI — UI framework
- SwiftData — Persistence for custom blocked domains
- Network Extension —
NEDNSProxyProviderfor system-wide DNS interception - ServiceManagement — Launch at login via
SMAppService
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a branch for your feature or fix:
git checkout -b feature/your-feature-name
- Commit your changes with a clear message
- Push to your fork and open a Pull Request
- Expanding the blocklist with additional domains
- Improving the DNS proxy performance
- Adding new SafeSearch engine support
- UI/UX improvements
- Bug fixes and documentation updates
Note: Since CleanBrowse uses a Network Extension, you'll need an Apple Developer account to build and test locally.
This project is licensed under the MIT License — see the LICENSE file for details.

