block-list-1.1.3 is not a library.
Block List
A minimalist hosts-based tool for managing block lists and ad-blocking.
This project uses the excellent and regularly updated Unified Hosts lists from Steven Black.
Installation
cargo install block-list
Usage
sudo block-list /path/to/hosts your-desired-list
Examples
Basic usage:
# Just use 'hosts' as the desired list if you only want ad-blocking.
sudo block-list /etc/hosts social
Pipe in a custom list:
cat someFile.txt | sudo block-list /etc/hosts
OR
cat someFile.txt | sudo block-list /etc/hosts social
Output
If successful, this command will append a new list or replace the current list at the tail of the supplied hosts file, eg:
Block List updated! 🔒
##
# Host Database
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
# Your list of addresses
1.2.3.4 somehost
...
# Block List
0.0.0.0 some.custom.address.net
0.0.0.0 another.custom.address.xyz
0.0.0.0 some.malware.address.com
0.0.0.0 another.blocked.address.xxx