Simple GUI toggle for /etc/resolv.conf for us old dogs still handling DNS that way.
- Toggling between 2 main DNS servers
- Toggle for a 3rd DNS server that overrides the 2 main (useful for VPN etc)
- Handles empty /etc/resolv.conf and creates it when we toggle
- Should leave alone things like domain, search and comments
- libgtk-3-dev
- librsvg2-dev
Make file nameservers.conf before building, example:
nameserver 1.1.1.1
nameserver 8.8.8.8
nameserver 9.9.9.9
Then:
sudo apt install libgtk-3-dev librsvg2-dev build-essential
git clone [email protected]:ittykeys/dns-toggle.git
cd dns-toggle
make
Please backup your precious /etc/resolv.conf before running:
sudo cp /etc/resolv.conf /etc/resolv.conf.bk
Then:
./dns-toggle
It will ask for authentication via pkexec when toggling.
- Detect and re-toggle previous state (and toggle state) properly after 3rd dns toggled (especially at startup).
- Detect and error out if /etc/resolv.conf is handled by another system.
- Future-proof for gtk4
- Add flag to auth immediately at launch, negating the need for auth every toggle
- Windows version (are network connection options exposed via win api?)
- Pack assets in executable
This project is licensed under the GNU General Public License - see the License file file for details.