Skip to content

Simple cli library to allow, fast allow/block of domains in /etc/hosts by adding, commenting and uncommenting [127.0.0.1 host] entries

Notifications You must be signed in to change notification settings

cassvail/etchost

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

etchost

Build Status

Simple cli library to allow, fast allow/block of domains in /etc/hosts by adding, commenting and uncommenting 127.0.0.1 host entries

OS Support:

  • MacOS/Linux: /etc/hosts
  • Windows: C:/Windows/System32/drivers/etc/hosts

Node Support >= 4.2.0

install

npm install -g etchost 

usage

root privilege is required to modify hosts file

etchost [options] <hostname> [hostnames...]

  Options:

    -a, --allow  block host
    -b, --block  allow host
    -h, --help   output usage information

Toggle allow/block host by commenting/uncommenting 127.0.0.1 domain.com entry

etchost domain.com

About

Simple cli library to allow, fast allow/block of domains in /etc/hosts by adding, commenting and uncommenting [127.0.0.1 host] entries

Resources

Stars

Watchers

Forks

Packages

No packages published