SwitchHosts README

The project's README from github.com/oldj/SwitchHosts. As one markdown file: README.md.

Special thanks to:
Warp sponsorship

Warp, the intelligent terminal for developers

Available for MacOS, Linux, & Windows


SwitchHosts

Manage and switch hosts files with ease. Built with Tauri and React.

Homepage · 简体中文 · 繁體中文 · Polski · Türkçe

SwitchHosts screenshot

Features

Download

Get SwitchHosts from GitHub Releases, or install on Windows with Chocolatey: choco install switchhosts.

Documentation & development

See the guide for editing hosts, backups, the local HTTP API, and build prerequisites.

npm install
npm run tauri:dev    # development
npm run tauri:build  # production build

SwitchHosts is a free and open source software, it is released under the Apache License.

SwitchHosts (oldj/SwitchHosts)

Searching Database…

What is this?SwitchHosts is a free, open-source desktop app for managing your hosts file: keep several hosts profiles and switch between them in one click from the main window or system tray.
Is it a desktop app or a library I add to my project?A standalone desktop app, built on Tauri with a React, Jotai and Mantine UI — it sits in the system tray and manages the system hosts file. Nothing to add to a project.
Do I need anything else on my machine to run it?Nothing extra — the downloaded app is self-contained. Node.js, Rust and Tauri system dependencies are only needed to build it from source.
If I export my hosts data, does the export include everything?No — the in-app export is a hosts data JSON without preferences or histories. For a complete backup, copy the whole ~/.SwitchHosts folder.
Which systems can I run it on?Windows, macOS and Linux, from a single Tauri codebase; builds are on the GitHub releases page, with a Chocolatey package for Windows.
Where does SwitchHosts keep my hosts data?Locally, in ~/.SwitchHosts (.SwitchHosts in the user home folder on Windows): manifest.json for the hosts tree, entries/ for contents, trashcan.json for deleted entries.
Is it free to use?Yes — it is free and open source software released under the Apache 2.0 license.
What can it do beyond switching profiles on and off?Quite a lot: syntax highlighting for hosts files, find and replace across entries, remote hosts refreshed manually or on a schedule, import/export including backups from a URL, a trashcan with restore, and a local HTTP API.
What is editing a hosts file inside it like?Like a code editor: hosts entries get syntax highlighting and find and replace, powered by CodeMirror, which is part of the app's dependencies.
Can I automate it, for example trigger switches from a script?Preferences include a local HTTP API and post-apply commands, so you can expose an HTTP endpoint and run commands after hosts entries are applied.
Why does building it require Rust if the app is written in TypeScript?The interface is TypeScript/React, but the desktop shell is Tauri, whose native backend is Rust code in src-tauri — that is why Node.js and Rust are both build prerequisites.
Creator
oldj
Size
35.1 MB
Stars
27.4K
Age
15y
Commits · 90 Days