Tenshi

crates.io aur

Tenshi is a fast CLI utility that fetches a curated hosts file, generates Unbound local-zone entries from it, and saves them to /etc/unbound/local-blocking-data.conf.

At the moment, only Steven Black's hosts file is used.

Tenshi is primarily written to work on Linux, but it will likely work on the BSDs. It is untested on Macintosh, 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.

Installation

Prerequisites

Install either rustup or rust using your favorite package manager. Tenshi is known to build against Rust 1.35.

Tenshi must be run as a user that has write access to /etc/unbound/local-blocking-data.conf.

Build with Cargo

cargo install tenshi

Build from source

git clone https://github.com/flacks/tenshi.git cd tenshi git checkout $(git tag | tail -n 1) cargo build --release cargo install --path .

Arch Linux

git clone https://aur.archlinux.org/tenshi-rs.git cd tenshi-rs makepkg -i

Synopsis

If installed with Cargo or built from source, ensure Cargo's bin directory is in your PATH.

Run tenshi and follow prompt. For promptless execution, prepend true | to command.

To do

Credits

Inspired by https://github.com/gbxyz/unbound-block-hosts

A kind Rust Discord server user in #beginners