Simple terminal interface for blocking websites via the /etc/hosts file

The binary is fully statically linked against musl-libc, so it should work

Simple terminal interface for blocking websites via the /etc/hosts file.

When you unblock or a remove a domain you'll be asked to enter a mildly annoying random passphrase to give you a chance to reconsider if you really want to go read reddit.

Must be run as sudo as it needs to write to /etc/hosts.

Controls

  • i - add a new domain
  • j/k - down, up
  • J/K - goto bottom, goto top
  • d - delete selected
  • space - toggle whether or not selected domain is blocked
  • q - Quit current mode, quits app if in normal mode.
  • h - View help.

Command line options:

  • -b block all
  • -u unblock all (requires typing the passphrase)
  • -h help message (showing these options)

Installation:

Linux x86_64 binary

If you're on linux on an x86_64 processor you can download a binary release here: https://github.com/cgag/hostblock/releases.

The binary is fully statically linked against musl-libc, so it should work on any distro.

Building from source

You'll need to have rustc and cargo installed, you can download them here: https://www.rust-lang.org/install.html. Note that cargo is bundled with rust.

- clone repo
- run `cargo build --release`
- sudo ./target/release/hostblock

You should probably move the binary to somewhere on your path.

General info

  • License: AGPL
Issues

Collection of the latest Issues

slakkenhuis

slakkenhuis

0

Thanks for the application - it's pretty useful!

However, I'm getting a compilation error on Debian Stretch (which has rustc 1.24.1 and cargo 0.25.0). Is there a specific version I should be running instead, or can this be fixed?

(I can make it compile by simply removing the Some() which wraps the k and Key::Ctrl('c'), but I'm not familiar with Rust so I don't actually know what that does.)

Versions

Find the latest versions by id

v1.0.1 - Sep 18, 2015

Fixes a bug where every time the hosts file was saved, a newline was inserted before the list of blocked domains. Harmless but annoying.

  • sha256sum: 4c1cff8d565f29d872859013788a4c253cb4e9ad1fe1a1dc7db22fb47c97f483

The attached binary will only run on Linux. It's fully statically linked with mus-libc, so it should run on any distro as long as you're on an x86_64 processor.

v1.0 - Sep 15, 2015

The attached binary will only run on Linux. It's fully statically linked with mus-libc, so it should run on any distro as long as you're on an x86_64 processor.

If you're on OSX, you'll need to build from source, see the README.

SHA256 for the binary: 474779d85bf3a20759a9fab07996493c7a2af5b65211f4cb14e55d5868484889

Information - Updated May 23, 2022

Stars: 94
Forks: 7
Issues: 1

Repositories & Extras

This is an example of a Rust server that functions as a remote schema for...

Rust + Hasura Rust server that functions as a Hasura

This is an example of a Rust server that functions as a remote schema for...

Newport Engine is a modular 2D and 3D game engine built in Rust for Rust

It is designed to be easily extendable and easy to use

Newport Engine is a modular 2D and 3D game engine built in Rust for Rust

Newport Engine is a modular 2D and 3D game engine built in Rust for Rust

It is designed to be easily extendable and easy to use

Newport Engine is a modular 2D and 3D game engine built in Rust for Rust

liboqs-rust: Rust bindings for liboqs

Qyantum Safe liboqs rust bindings

liboqs-rust: Rust bindings for liboqs

msgflo-rust: Rust participant support for MsgFlo

Flowhub visual programming IDE

msgflo-rust: Rust participant support for MsgFlo

Trojan-rust is a rust implementation for Trojan protocol that is targeted to circumvent GFW

Trojan protocol that is targeted to circumvent tokio-rs to achieve high performance async io

Trojan-rust is a rust implementation for Trojan protocol that is targeted to circumvent GFW
Actix

1.0K

How to be a full stack Rust Developer

Read Rust the Rust blog posts at Steadylearner

How to be a full stack Rust Developer

Rust library translation (rust-src/rust-std/stdlib/rustlib translation)

This is the place to translate Having a documentation in your native language is essential if you don't speak English, and still enjoyable even if...

Rust library translation (rust-src/rust-std/stdlib/rustlib translation)

False Positive for rust-lang/rust#83583

The deprecation lint proc_macro_derive_resolution_fallback is intended to catch proc macro generated code that refers to items from parent modules that should not be in scope:

False Positive for rust-lang/rust#83583

A CHIP-8 & SuperChip interpreter written in Rust using rust-sdl2

If you're getting compile errors it may be because

A CHIP-8 & SuperChip interpreter written in Rust using rust-sdl2

Rust-Svelte-on-Rust

Starter template for Rocket backend server

Rust-Svelte-on-Rust
Facebook Instagram Twitter GitHub Dribbble
Privacy