An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# OneDNS

> Smart DNS Switcher for Linux with Backup and Restore
> Written in pure Bash โ€” minimal, fast, and efficient.

![Version](https://img.shields.io/badge/version-2.0-blue)
![License](https://img.shields.io/badge/license-GPLv3-green)

## ๐Ÿš€ 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!