dnsprotec
DNS /etc/hosts file manager, Block 1 Million malicious domains with 1 command
Summary
| Latest Version | Unknown |
|---|---|
| License | MIT |
| CI Status | Passing |
| Downloads | 0 |
| Last Indexed | 2026-07-21 05:24 |
Tags
Installation
nimble install dnsprotec
choosenim install dnsprotec
git clone https://github.com/juancarlospaco/nim-dnsprotec
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| dnsprotec | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://github.com/juancarlospaco/nim-dnsprotec |
|---|---|
| Homepage | https://github.com/juancarlospaco/nim-dnsprotec |
| Registry Source | nimble_official |
README
DNS Protec
- DNS
/etc/hostsfile manager, Block 1 Million malicious domains on 1 command. - 1 File, 0 Dependency, no config, no setup, works Offline, for any Linux, 60 lines of code.
- Does NOT overwrite
/etc/hostsby default, Backup by default, can delete itself (for Docker), runs on Alpine.

Use
$ dnsprotec
- If you reply
nto everything it gives you your current/etc/hostsfile.
Download
- https://github.com/juancarlospaco/nim-dnsprotec/releases
Install
nimble install dnsprotec
Compile
$ nim c dnsprotec.nim
- Force overwriting of
/etc/hostswith-d:overwrite. - Your current
/etc/hostswill be statically read as a base template for new host files. - Compilation requires Internet, but after that it works 100% Offline.
- You can add your custom local or remote DNS Blacklists on
hostsfile format, separated by comma:
-d:customUrls="http://foo.io/hosts,http://bar.io/blacklist,http://127.0.0.1/blockedDNS"
Spotify
As a side-effect, Spotify desktop app behaves like Premium, it will not show Ads, but plays music.
If it stops playing music disable the DNS protec, use it for a while, and you can enable it back later, it seems from time to time it checks with Spotify servers, but yeah Spotify Premium for free ;)
Why
I know there are other scripts, but those need a virtual machine or interpreter, and need to be online to work properly, I needed one that can work offline and standalone.