Crates.io | host-rs |
lib.rs | host-rs |
version | 0.2.3 |
source | src |
created_at | 2024-06-21 02:49:49.1469 |
updated_at | 2024-10-23 09:59:36.555996 |
description | This is a CLI tool to manage website blocking, unblocking, redirection. |
homepage | https://github.com/BiswajitThakur/host-rs |
repository | https://github.com/BiswajitThakur/host-rs |
max_upload_size | |
id | 1279057 |
size | 59,814 |
Blazingly fast CLI tool written in Rust to manage website blocking, unblocking, redirection.
Ensure you have Rust installed (If you dont want to install Rust, install from precompiled binary).
git clone https://github.com/BiswajitThakur/host-rs.git
cd host-rs/
./install.sh
cargo install host-rs
> host-rs --help
This is a CLI tool to manage website blocking, unblocking, redirection.
Usage: host-rs [OPTIONS] [COMMAND]
Commands:
insert Add host or url to allow, block, redirect, sources list
remove Remove allow, block, redirect host and host sources
print Print allow, block, redirect, etc host and host sources
import Import host or url from file
export Expoer user data (you can import it later)
update Update sources or self
help Print this message or the help of the given subcommand(s)
Options:
--allow <ALLOW>... Add host to allow list & removed from block list
--block <BLOCK>... Add to block list & remove from allow list
--redirect <REDIRECT>... Add to redirect list & remove from allow and block
--restore delete all host, host sources and restore /etc/hosts file
-h, --help Print help
-V, --version Print version
host-rs --block <url or hostname1> <url or hostname2> ...
host-rs rm --block <url or hostname1> <url or hostname2> ...
# or
# host-rs remove --block <url or hostname1> <url or hostname2> ...
use this when, you added hostsources and if it block some website and you don't want to block it.
host-rs --allow <url or hostname1> <url or hostname2> ...
host-rs rm --allow <url or hostname1> <url or hostname2> ...
In the following example, <url or hostname2>
redirected to <url or hostname1>
and <url or hostname4>
redirected to <url or hostname3>
host-rs --redirect <url or hostname1> <url or hostname2> <url or hostname3> <url or hostname4> ...
host-rs rm --redirect <url or hostname2> <url or hostname4> ...
You will get verious sources from this repo.
host-rs insert --sources <url of sources>
host-rs update --sources
host-rs remove --sources <url of sources>
host-rs remove --self
Contributions are welcome! If you find any bugs, want to request a new feature or improve the code feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.