PingBar is a lightweight, modern, non-intrusive, native macOS menu bar app that continuously monitors your network connectivity and DNS settings.
It provides real-time ping statistics, network interface information, and one-click DNS management including dnscrypt-proxy control, all from your menu bar with minimal system resource usage.
The main menu shows real-time network status with:
- Current ping time and status (🟢 for good connectivity)
- Sparkline graph with ping statistics (avg/min/max)
- Active network interfaces with IP addresses
- Current DNS resolver information
- Quick access to DNS management and preferences
The preferences window allows you to configure:
- Ping interval and target host
- High ping threshold for warnings
- DNS auto-revert behavior for captive portals
- Launch at login option
- Live Network Status: Pings a configurable host (default: Google) and shows status with colored icons (🟢/🟡/🔴/🟠) in the menu bar.
- Historical Ping Graph: Unicode sparkline graph and statistics (avg/min/max) for recent pings.
- Network Interface Info: Displays active local IP addresses with interface names.
- DNS Resolver Display: Shows current DNS resolvers for your default interface.
- DNS Management: Change DNS for your default interface with one click (System Default, Cloudflare, Google, Quad9, 114DNS, dnscrypt-proxy, etc.). Perfect for controlling dnscrypt-proxy usage from the menu bar.
- Captive Portal Detection: Detects captive portals and can auto-revert DNS to default, restoring your custom DNS after login.
- Preferences Dialog: Configure ping interval, target host, high ping threshold, DNS auto-revert, and launch at login.
- Auto-Start: Optionally launch PingBar at login using a LaunchAgent.
- Lightweight & Native: Built with Swift, AppKit, and SwiftPM. No Python or Electron, no bloat. Minimal memory footprint.
Install PingBar using Homebrew Cask:
git clone https://github.com/jedisct1/pingbar.git
cd pingbar
brew install --cask ./Casks/pingbar.rb
open /Applications/PingBar.app
Download the latest release from the Releases page. Pre-built binaries are available for both Intel and Apple Silicon Macs.
- macOS 12.0+ (Monterey) recommended
- Xcode 14+ or Swift 6.1+
- Command line tools:
swift
,codesign
(for signing)
git clone https://github.com/jedisct1/pingbar.git
cd pingbar
make bundle
make install
See INSTALL.md for detailed installation instructions.
brew uninstall --cask pingbar
To completely remove PingBar from your system:
- Quit PingBar: Click the menu bar icon → "Quit PingBar"
- Remove the app: Drag
PingBar.app
to Trash (usually in/Applications/
or wherever you placed it) - Remove launch agent (if enabled):
rm ~/Library/LaunchAgents/com.pingbar.app.plist
- Remove preferences (optional):
defaults delete com.pingbar.app
That's it! PingBar stores minimal data and leaves no background processes running.
# Clone the repository
git clone https://github.com/jedisct1/pingbar.git
cd pingbar
# Build debug version
swift build
# Build release version
swift build -c release
# Run tests
swift test
# Create app bundle
./bundle_pingbar_app.sh
- Launch PingBar: Double-click
PingBar.app
or run from the command line - Menu Bar Icon: Look for the colored icon in your menu bar (🟢/🟡/🔴/🟠)
- Click the Icon: View network status, ping statistics, and current settings
- Configure Settings: Select "Preferences…" to customize behavior
- Network Status: Current ping time and connection status
- Ping Graph: Visual sparkline showing recent ping history with statistics
- Network Interfaces: List of active network interfaces and their IP addresses
- DNS Servers: Current DNS resolvers for your default interface
- DNS Management: Quick access to change DNS settings
- Preferences: Configure all app settings
PingBar provides one-click DNS switching for your default network interface:
- System Default: Use your network's default DNS
- Cloudflare (1.1.1.1): Fast, privacy-focused DNS
- Google (8.8.8.8): Reliable public DNS
- Quad9 (9.9.9.9): Security-focused DNS with malware blocking
- 114DNS (114.114.114.114): Popular DNS service in China
- dnscrypt-proxy (127.0.0.1): Local encrypted DNS proxy - easily toggle dnscrypt-proxy on/off from the menu bar
Access preferences via the menu bar icon → "Preferences…"
Setting | Description | Default |
---|---|---|
Ping Interval | How often to ping the target (seconds) | 5.0 |
Target Host | URL or IP to ping | https://www.google.com |
High Ping Threshold | Latency threshold for warning state (ms) | 200 |
DNS Auto-Revert | Revert DNS to system default when network is unreachable | false |
Restore Custom DNS | Restore custom DNS after captive portal login | false |
Launch at Login | Auto-start PingBar when you log in | false |
Icon | Status | Description |
---|---|---|
🟢 | Good | Network is responsive (ping < threshold) |
🟡 | Warning | High latency (ping ≥ threshold) |
🔴 | Bad | Network unreachable or failed |
🟠 | Captive Portal | Captive portal detected |
When enabled, PingBar can automatically:
- Detect captive portals (hotel/airport WiFi login pages)
- Revert your custom DNS to system default to allow portal access
- Restore your custom DNS after successful login
This ensures seamless connectivity while preserving your DNS preferences.
# Run all tests
swift test
# Run specific test
swift test --filter TestName
PingBar doesn't appear in menu bar
- Ensure macOS 12.0+ is installed
- Check that the app has accessibility permissions if needed
- Try relaunching the app
DNS changes don't work
- Verify you have administrator privileges
- Check that
networksetup
command line tool is available - Ensure your network interface is active
App won't launch
- Check Console.app for error messages
- Verify code signing if you built from source
- Try removing and reinstalling
- Use a reliable, fast target host for pinging
- Set reasonable ping intervals (5-10 seconds recommended)
- Enable launch at login for continuous monitoring
PingBar follows security best practices:
- Minimal Permissions: Only requests necessary system access
- No Data Collection: All data stays local on your device
- Open Source: Code is publicly auditable
- Code Signing: Release builds are signed and notarized
PingBar does not:
- Collect or transmit personal data
- Track your browsing habits
- Store sensitive information
- Connect to external services (except for ping tests)
- macOS: 12.0 (Monterey) or later
- Architecture: Intel x64 or Apple Silicon (Universal Binary)
- Memory: 50MB RAM typical usage
- Permissions: Administrator access for DNS changes (optional)
PingBar is released under the MIT License.
- Inspired by classic menu bar network tools like MenuMeters and iStat Menus
- Uses Apple's AppKit for native UI
- Built with Swift Package Manager
- DNS management via
networksetup
and AppleScript - Unicode sparkline graphs for visual ping history
PingBar — Network and DNS monitoring at a glance, right from your Mac menu bar. 🌐