Github url


by oldj

Switch hosts quickly!

10.3K Stars 1.3K Forks Last release: 6 months ago (v3.5.4) MIT License 882 Commits 35 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:



SwitchHosts! is an App for managing hosts file, it is based on Electron, React, Ant Design, CodeMirror, etc.




  • Switch hosts quickly
  • Syntax highlight
  • Remote hosts
  • Switch from system tray
  • macOS only: Alfred workflow support



You can download the source code and build it yourself, or download the built version from following links:


On macOS you can install SwitchHosts! by

brew cask


brew cask install switchhosts

Thanks to @gobinathm and @iamybj for updating the

brew cask



On Windows you can install SwitchHosts! by scoop:

scoop install switchhosts

Thanks to @batkiz for updating the




SwitchHosts! stores data at


(Or folder


under the current user's home path on Windows), the


contains data, while the


contains preferences info.

Run and Build


  • Install Node.js
  • Change to the folder
    , run
    npm install
    to install dependented libraries

Change to the folder


, run

npm install


npm install cd app && npm install && cd ..

Build and run

  • Change to the folder
    , run
    npm run dll
    to build common files
  • Change to the folder
    , run
    npm run build

Change to the folder


, run

npm start

, the App should start

# create dll file npm run dll # build npm run build # start npm start # or start in developer mode npm run dev


  • It is recommended to use electron-builder for packaging.
  • Go to the
    folder, run
    npm run make
    . The packaged files will be in the

This command may take several minutes to finish when you run it the first time, as it needs time to download dependent files. You can download the dependencies manually here, or Taobao mirror, then save the files to


. You can check the Electron Docs for more infomation.

# pack npm run make # the packed files will be in ./dist # or npm run build-and-make


SwitchHosts! is a free and open source software, it is released under the MIT license.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.