Skip to content

DuanPengfei/chhosts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chhosts

Quickly switch hosts.

Install

npm install -g chhosts

Usage

mkdir ~/chhosts
# put preset hosts file in ~/chhosts

└── chhosts
   ├── some_other
   └── default
sudo chhosts

Preview

➜  chhosts ll
total 16
-rw-r--r--  1 huaiyu  staff   365B  8 27 10:14 default
-rw-r--r--  1 huaiyu  staff   850B  8 27 10:28 some_other
➜  chhosts cat default
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1	localhost
255.255.255.255	broadcasthost
::1             localhost

# Added by Docker Desktop
# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal
# End of sectio
➜  chhosts sudo chhosts
Password:
? please select hosts file (Press <space> to select, <a> to toggle all, <i> to invert selection)
❯◉ default
 ◯ some_other

About

quickly change hosts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published