A lightweight and user-friendly menu bar application for macOS that allows quick switching between popular DNS providers. Easily toggle between Cloudflare, Google, and Quad9 DNS servers with just a click.
- 🔄 Quick DNS switching from the menu bar
- 🔒 Secure switching with administrator privileges
- 🎯 Support for popular DNS providers:
- Cloudflare (1.1.1.1)
- Google (8.8.8.8)
- Quad9 (9.9.9.9)
- 📱 Native macOS menu bar integration
- 🔔 System notifications for DNS changes
- 👁 Visual indication of current DNS provider
- 🚀 Automatic startup option
- 💻 Works with Wi-Fi connections
- macOS 10.12 or later
- Python 3.6 or later
- Administrator privileges (for changing DNS settings)
- Clone the repository:
git clone https://github.com/makalin/MacDNS.git
cd MacDNS- Install the required dependencies:
pip3 install rumps pyobjc- Make the script executable:
chmod +x macdns.py- Add an icon file:
- Place a PNG file named
icon.pngin the same directory as the script - Recommended size: 32x32 pixels
- Start the application:
./macdns.py- Click the menu bar icon to see available DNS options
- Select your desired DNS provider
- Enter administrator password when prompted
- Wait for the confirmation notification
To make DNS Switcher start automatically on login:
- Open System Preferences
- Navigate to Users & Groups
- Select your user account
- Click the "Login Items" tab
- Click the "+" button
- Navigate to and select the macdns.py file
- Primary: 1.1.1.1
- Secondary: 1.0.0.1
- Features: Fast, privacy-focused
- Primary: 8.8.8.8
- Secondary: 8.8.4.4
- Features: Reliable, widely used
- Primary: 9.9.9.9
- Secondary: 149.112.112.112
- Features: Security-focused, malware blocking
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a new branch (
git checkout -b feature/improvement) - Make your changes
- Commit your changes (
git commit -am 'Add new feature') - Push to the branch (
git push origin feature/improvement) - Create a Pull Request
- Set up a virtual environment:
python3 -m venv venv
source venv/bin/activate- Install development dependencies:
pip install -r requirements-dev.txt- Run tests:
python -m pytest tests/- The application requires administrator privileges only when changing DNS settings
- All DNS changes are logged and notified to the user
- No data collection or external connections besides DNS configuration
-
"Permission denied" error
- Ensure the script has executable permissions
- Run with administrator privileges when changing DNS
-
Icon not showing
- Verify icon.png exists in the correct directory
- Check icon file format and size
-
DNS not changing
- Verify Wi-Fi is connected
- Check administrator password is correct
- Ensure no system DNS locks are in place
This project is licensed under the MIT License - see the LICENSE file for details.
- rumps for macOS menu bar integration
- DNS providers for their public DNS services
- Contributors and testers
- 1.0.0 (2024-01-01)
- Initial release
- Basic DNS switching functionality
- Menu bar integration
- Create an issue for bug reports or feature requests
- Submit pull requests for contributions