hc-rs -> hosts-creator-rust
fetch and merge multiple hosts files
this is a WIP
whats done
- fetching hosts files
- merging hosts files
- removing duplicate lines
- cli options
- colored output messages
- configuration file
- replace with /etc/hosts(i think this should be done manually though)
building from git source
$ git clone https://github.com/XDream8/hc-rs
$ cd hc-rs
$ cargo build --profile optimized
$ ./target/optimized/hc-rs
usage
$ hc-rs -h
$ hc-rs <urls> <flags>
creating a hosts file
- pass urls directly to hc-rs
- you can pass as much urls as you want to
$ hc-rs https://badmojr.github.io/1Hosts/Pro/hosts.txt https://hosts.oisd.nl
removing duplicate lines
use --rm_duplicate_lines(-rmd) flag to remove duplicate lines from the final file
$ hc-rs -rmd
setting output filename
use --output(-o) flag to set output filename
default filename is "hosts"
$ hc-rs -o new-hosts
aliasing in your shell config
alias create-hosts='hc-rs -rmd https://badmojr.github.io/1Hosts/Pro/hosts.txt https://hosts.oisd.nl'