host-rs-1.0.2 is not a library.
Visit the last successful build:
host-rs-0.1.2
Host-RS
A CLI tool that manage website blocking, unblocking, redirection.
Features
- Block Website: Add websites to blocklist to prevent access.
- Unblock Website: Remove websites from the blocklist to allow access.
- Redirect Website: Redirect traffic from one website to another.
- Add Host Sources: Add host source (A url that contains a list of hostnames).
- Update Host Sources: Update host sources.
- Import hosts: Import hostnames stored in a file and block or unblock them.
- Export hosts: Export the list of currently blocked or unblocked hosts.
Installation
Ensure you have Rust installed (If you dont want to install Rust, install from precompiled binary).
Linux & macOS
Other
cargo install host-rs
Usage
- Help
> host-rs --help
A CLI tool that 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
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-etc-hosts restore /etc/hosts file
--clear-all-data Clear all data
--export <EXPORT> Expoer user data (you can import it later)
--import <IMPORT> Import data
-h, --help Print help
-V, --version Print version
- Block Website
- Remove Website from Blocklist
# or
# host-rs remove --block <url or hostname1> <url or hostname2> ...
- Allow Website
use this when, you added hostsources and if it block some website and you don't want to block it.
- Remove Website from Allow List
- Redirection
In the following example, <url or hostname2>
redirected to <url or hostname1>
and <url or hostname4>
redirected to <url or hostname3>
- Remove from Redirect
- Add Host Sources
You will get verious sources from this repo.
- Update Host Sources
- Remove Host Sources
- Uninstall
Contributing
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.
License
This project is licensed under the MIT License. See the LICENSE file for details.