Skip to content

A macOS menu bar app that blocks adult content at the system level

License

Notifications You must be signed in to change notification settings

EngOmarElsayed/CleanBrowse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CleanBrowse Icon

CleanBrowse

CleanBrowse on VibeRank

Latest Release Platform Swift License

A macOS menu bar app that blocks adult content at the system level.


CleanBrowse Screenshot

What is CleanBrowse?

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.

Features

  • System-wide blocking — Blocks ~249,000 adult domains via /etc/hosts modification
  • 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

How It Works

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

Requirements

  • macOS 14 (Sonoma) or later
  • Admin password (required on first launch to modify /etc/hosts)

Installation

Download

Download the latest .zip from the Releases page, unzip it, and move CleanBrowse.app to your Applications folder.

Build from source

  1. Clone the repository:
    git clone https://github.com/EngOmarElsayed/CleanBrowse.git
  2. Open CleanBrowse.xcodeproj in Xcode
  3. Build and run (requires an Apple Developer account for the Network Extension entitlement)

Usage

  1. Launch CleanBrowse — it appears as a shield icon in the menu bar
  2. On first launch, you'll be prompted for your admin password to apply the blocklist
  3. The DNS proxy activates automatically
  4. To add custom domains, click the menu bar icon and type a domain in the input field
  5. To quit, click the power icon — you'll need to solve a riddle first

Tech Stack

  • SwiftUI — UI framework
  • SwiftData — Persistence for custom blocked domains
  • Network ExtensionNEDNSProxyProvider for system-wide DNS interception
  • ServiceManagement — Launch at login via SMAppService

Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a branch for your feature or fix:
    git checkout -b feature/your-feature-name
  3. Commit your changes with a clear message
  4. Push to your fork and open a Pull Request

Ideas for contributions

  • 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.

License

This project is licensed under the MIT License — see the LICENSE file for details.

About

A macOS menu bar app that blocks adult content at the system level

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 2

  •  
  •