This utility fetches a curated hosts file, generates Unbound local-zone entries from it, and saves them to
At the moment, only Steven Black's hosts file is used. Source: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts.
This utility is meant to work on Linux. It is untested on Mac, and will probably not work on Windows.
You will want to add
include: "local-blocking-data.conf" to your Unbound config to use the result.
Install either rustup or
rust using your favorite package manager.
This utility has been tested to work with Rust 1.34.2.
sudo is needed if you do not have write access to
Build with Cargo
cargo install tenshi
git clone https://aur.archlinux.org/tenshi-rs.git cd tenshi makepkg -i
Build from source
git clone https://github.com/flacks/tenshi.git git checkout $(git tag | tail -n 1) # Optional cd tenshi cargo build --release cargo install --path .
If installed with Cargo or built from source, run
sudo tenshi, excluding
sudo if you have write access to
If installed from the Arch User Repository, run
sudo tenshi-rs, heeding the same
sudo exception above.
Utility will prompt to continue. For promptless execution, prepend
echo y | to command.
Actually support different hosts files
- Upstream variants
- Custom hosts files support
- Argument support
- Quiet mode
- Support changing data destination
- Modularize code
Inspired by https://github.com/gbxyz/unbound-block-hosts
A kind Rust Discord server user on #beginners