A fast terminal UI to switch DNS providers on Linux, written in Rust.
Built on an event-driven loop that only redraws when something changes, so it sits at roughly 0% CPU while idle.
- Multi-profile DNS Support: Switch between resolver variants (e.g., Cloudflare Standard, Security, and Family; AdGuard Default and Family) with a single keypress
- Unified TOML Configuration: Full control over all presets and custom resolvers via
~/.config/dns-switcher/config.toml - In-App Config Editor: Press
eto edit configuration directly in$EDITORwith automatic live reloading - Latency Testing: Real-time probe to see which resolver responds fastest before applying
- Automatic Detection: Detects the current active system DNS on startup
- Responsive Terminal UI: Adapts smoothly to narrow or compact terminal windows; keyboard-driven, vim-friendly navigation
- Linux with
systemd-resolved iwd(Wi-Fi handling)polkit(privilege elevation when applying changes)
Arch Linux (AUR):
yay -S dns-switcher
Other distributions (install script):
curl -sSL https://raw.githubusercontent.com/IovAnto/dns-switcher/main/install.sh | bashFrom source (requires Rust):
git clone https://github.com/IovAnto/dns-switcher.git
cd dns-switcher
cargo build --release
sudo install -Dm755 target/release/dns-switcher /usr/local/bin/dns-switcherdns-switcher
| Key | Action |
|---|---|
↑ ↓ / k j |
Move selection |
← → / Tab |
Switch provider profile (e.g., Standard ↔ Security ↔ Family) |
Enter |
Apply the selected provider and profile |
t |
Run latency test |
e |
Open config.toml in $EDITOR (live reloads on exit) |
a |
Add a custom provider |
d / Delete |
Delete the selected provider |
r |
Reset DNS to ISP default |
R |
Reset configuration file to default template |
h |
Toggle help |
q / Esc |
Quit |
dns-switcher --help # Show CLI options dns-switcher --config # Print path to config.toml dns-switcher --edit # Open config.toml in $EDITOR directly dns-switcher --reset-config # Reset config.toml to the default template
Rust · ratatui · crossterm · tokio
MIT
