A cross-platform DNS switcher tool built with Tauri 2, React, and Rust. Supports Windows and macOS.
- TypeScript 45.1%
- CSS 29.3%
- Rust 25%
- HTML 0.6%
| public | ||
| src | ||
| src-tauri | ||
| .gitignore | ||
| index.html | ||
| LICENSE | ||
| package.json | ||
| README.en.md | ||
| README.md | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vite.config.ts | ||
DNS Chooser
Cross-platform DNS Resolution Server Switching & Management Tool
Features
Core Features
| Feature | Description |
|---|---|
| DNS Latency Probing | Performs UDP-based latency measurement against built-in and custom DNS servers; results auto-sorted by response time |
| DNS Quick Switching | Apply target DNS configuration with a single click based on probe results or preset list |
| Custom DNS Configuration | Manually specify primary and secondary DNS server addresses |
| DHCP Fallback | One-click restore to DHCP-automated DNS acquisition |
| DNS Cache Flushing | Windows: ipconfig /flushdns, macOS: dscacheutil -flushcache |
| DNS Resolution Lookup | Query domain resolution results via a specified DNS server |
| Privilege Status Detection | Real-time UI indicator showing whether the current process holds administrator/root privileges |
Additional Features
| Feature | Description |
|---|---|
| Adaptive Theme | Automatically follows system light/dark theme for optimal visual comfort |
| DNS Preset Library | 12 mainstream public DNS services pre-configured for one-click selection |
| Custom Probe List | Batch latency probing against any user-specified DNS address list |
| Real-time DNS Status | Continuously displays current network interface DNS configuration |
| UDP Direct Probing | Sends real DNS query packets to port 53; results are more representative than ICMP Ping |
Quick Start
Prerequisites
- Node.js >= 18
- Rust (installation guide: https://www.rust-lang.org/tools/install)
- Tauri CLI:
npm install -g @tauri-apps/cli
Windows Additional Requirements
- Visual Studio 2022 Build Tools (select "Desktop development with C++" workload)
- Or install via:
winget install Microsoft.VisualStudio.2022.BuildTools
Launch Development Mode
git clone https://github.com/z1HwanG/DNS-Chooser.git
cd DNS-Chooser
npm install
npm run tauri:dev
Build Release
npm run tauri:build
Privilege Notes
Modifying system DNS configuration and flushing DNS cache requires administrator privileges:
| Platform | Authorization Method |
|---|---|
| Windows | Right-click → "Run as administrator" |
| macOS | System authorization dialog via osascript |
Architecture
| Layer | Technology |
|---|---|
| Frontend Framework | React 18 + TypeScript |
| Build Tool | Vite 5 |
| Desktop Framework | Tauri 2 |
| Backend Runtime | Rust |
| DNS Probing | Native UDP Socket (tokio) |
| System Interface | netsh (Windows) / networksetup (macOS) |
| Styling | Pure CSS (CSS Variables Theme System) |
| Notification | react-hot-toast |
License
This project is open-sourced under the MIT license.