Locale is a native macOS utility for switching named DNS contexts.
It is built with SwiftUI. Day-to-day local builds can use Swift Package Manager, while App Store archives should use the checked-in Xcode project. Locale stores contexts locally, applies the active host mappings through a sandboxed DNS Proxy Network Extension, and leaves system host files untouched.
- Create named DNS contexts for local development, VPNs, labs, and temporary debugging.
- Add, disable, and remove host mappings per context.
- Apply a context through Locale's bundled
NEDNSProxyProvidersystem extension. - Revert to a clean
Homecontext to clear Locale-managed DNS mappings. - Switch active contexts from the menu bar.
- Import and export contexts as JSON.
- Use an adaptive macOS app icon compiled from
Assets/AppIcon.icon.
The marketing site lives in website/ and is deployed with GitHub Pages from
.github/workflows/pages.yml.
Locale uses a sandboxed main app plus a bundled DNS Proxy Network Extension:
- Main app writes the active context to the shared App Group defaults.
LocaleDNSProxyreads the same App Group data.- Matching DNS questions receive the configured IP address.
- Unmatched DNS traffic is forwarded to the system DNS servers.
The app does not use osascript, a privileged helper, or direct /etc/hosts
writes.
- macOS 14 or newer
- Xcode command line tools
- Swift toolchain with SwiftPM
- Apple Developer capabilities for App Groups, System Extensions, and DNS Proxy Network Extension when signing for distribution
./script/build_and_run.sh --verifyThe app bundle is written to:
dist/Locale.app
Open Locale.xcodeproj, select the LocaleApp scheme, then use
Product > Archive. Do not archive the Swift package workspace directly; package
archives appear in Organizer as Generic Xcode Archives instead of macOS app
archives.