https://github.com/bdadmehr0/onedns
All DNS in one
https://github.com/bdadmehr0/onedns
dns linux proxy shell-script
Last synced: about 1 year ago
JSON representation
All DNS in one
- Host: GitHub
- URL: https://github.com/bdadmehr0/onedns
- Owner: BDadmehr0
- Created: 2023-05-31T11:59:27.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-02-25T00:40:41.000Z (over 1 year ago)
- Last Synced: 2025-03-28T10:21:22.194Z (over 1 year ago)
- Topics: dns, linux, proxy, shell-script
- Language: Shell
- Homepage:
- Size: 1.58 MB
- Stars: 14
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OneDNS
> Smart DNS Switcher for Linux with Backup and Restore
> Written in pure Bash โ minimal, fast, and efficient.


## ๐ About
**OneDNS** is a lightweight command-line tool for managing DNS settings on Linux systems.
It allows you to switch DNS providers with one click, reset to default, and safely restore your original settings from backup.
## ๐ง Features
- โ
System-wide installation or live usage (no install needed)
- โ
Switch between trusted DNS providers (403, Electro, Shecan)
- โ
Reset to Google DNS (8.8.8.8)
- โ
Automatic backup of original `/etc/resolv.conf`
- โ
Easy restore of backup anytime
- โ
Clean uninstallation option
- ๐ "Filter check" feature is present in code (commented out for now)
## ๐ฆ Installation
### Live mode (no installation):
```bash
sudo bash onedns.sh
```
### Install system-wide:
When prompted, select:
```
[1] Install (system-wide)
```
Then use it from anywhere with:
```bash
sudo onedns
```
## ๐ป Usage
Youโll see a menu like this:
```
[1] Start DNS Options
[2] Reset DNS (8.8.8.8)
[5] About
[6] Show Current DNS
[7] Restore Original DNS from Backup
[9] Uninstall OneDNS
[00] Exit
```
### DNS Options:
- **403 Online** โ `10.202.10.202, 10.202.10.102`
- **Electro** โ DNS optimized for unlocking YouTube
- **Shecan** โ Reliable Iranian DNS provider
## ๐ง Backup & Restore
The script creates a **one-time backup** of `/etc/resolv.conf` when you first change the DNS.
To restore it at any time, select:
```
[7] Restore Original DNS from Backup
```
## ๐งน Uninstalling
You can completely remove OneDNS and its backup using:
```
sudo onedns
# Then select option [9] Uninstall
```
## ๐ License
This project is licensed under the **GNU General Public License v3.0**.
See the [LICENSE](./LICENSE) file for details.
## ๐จโ๐ป Author
Made with โค๏ธ by [@BDadmehr0](https://github.com/BDadmehr0)
If you find this tool useful, feel free to star ๐ the repo and share it with others!