登录 注册

SwitchHosts

去点 Star
内容创作与媒体工具开发者工具 electronhostshostseditorhostsfileswitch-hostsswitchhosts
27,396
Stars
2,689
Forks
396
Watchers
395
Open Issues
Apache-2.0
许可证
TypeScript
语言
2011-09-02
创建时间
2026-11-11
最近更新

项目能做什么

用于快速切换和便捷管理 hosts 文件的跨平台工具。
来源:AI 基于仓库事实生成 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
<div align="center" markdown="1">
  <sup>Special thanks to:</sup>
  <br>
  <a href="https://go.warp.dev/SwitchHosts">
    <img alt="Warp sponsorship" width="400" src="https://github.com/user-attachments/assets/bb4a0222-12bf-4c79-bb80-a8ed4672b801" />
  </a>

### [Warp, the intelligent terminal for developers](https://go.warp.dev/SwitchHosts)

[Available for MacOS, Linux, & Windows](https://go.warp.dev/SwitchHosts)<br>

</div>

---

# SwitchHosts

- [Polski](README.pl.md)
- [简体中文](README.zh_hans.md)
- [繁體中文](README.zh_hant.md)

Homepage: [https://switchhosts.app](https://switchhosts.app)

SwitchHosts is an App for managing hosts file, it is based on [Tauri](https://tauri.app/), [React](https://facebook.github.io/react/), [Jotai](https://jotai.org/), [Mantine](https://mantine.dev/), etc.

## Screenshot

<img src="./screenshots/sh_light.png" alt="SwitchHosts screenshot" width="978">

## Features

- Manage system, local, remote, group, and folder hosts entries
- Switch hosts quickly from the main window or system tray
- Syntax highlighting for hosts files
- Find and replace across hosts entries
- Refresh remote hosts manually, on a schedule, or at startup
- Import/export hosts data, including importing backups from a URL
- Move entries to the trashcan and restore or delete them later
- Preferences for write mode, proxy, update checks, launch at login, post-apply commands, and the local HTTP API

## Install

### Download

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

- [SwitchHosts Download Page (GitHub release)](https://github.com/oldj/SwitchHosts/releases)

You can also install the built version using the [package manager Chocolatey](https://community.chocolatey.org/packages/switchhosts):

```powershell
choco install switchhosts
```

## Backup

SwitchHosts stores data at `~/.SwitchHosts` (Or folder `.SwitchHosts` under the current user's home
path on Windows). In the v5 data layout:

- `~/.SwitchHosts/manifest.json` stores the hosts tree
- `~/.SwitchHosts/entries/` stores local and remote hosts content
- `~/.SwitchHosts/trashcan.json` stores trashcan entries
- `~/.SwitchHosts/internal/config.json` stores preferences
- `~/.SwitchHosts/internal/histories/` stores system hosts and command run history

For a complete manual backup, copy the whole `~/.SwitchHosts` folder. The in-app export creates a hosts data backup JSON; it does not include preferences or histories.

System hosts are written as UTF-8 without a BOM. Before converting an existing Windows ANSI or BOM-marked UTF-16 file, SwitchHosts saves its original bytes in `internal/histories/hosts-encoding-backups/` under the active data directory, even when history recording is disabled. These `.bin` backups are not removed by the history limit or included in the in-app JSON export.

## Develop and build

### Prerequisites

- [Node.js](https://nodejs.org/) 24 LTS
- [Rust](https://www.rust-lang.org/tools/install) >= 1.90
- Tauri system dep
阅读完整原文

商业机会分析 AI 生成

TeamHosts:团队级研发环境与Hosts配置协作平台

产品构想将 SwitchHosts 升级为支持多团队协作的云端管控工具,通过集中式控制台统一推送、更新和管理团队内各项目的环境配置与 hosts 映射,避免口口相传和繁琐的手动配置。
核心功能团队环境分组、云端实时同步、RBAC权限控制、配置变更审计日志、一键下发到SwitchHosts客户端
目标用户中大型研发团队负责人、DevOps工程师、QA团队主管
难度/周期中等 · 2-3个月 · 成本:低(云服务器与基础数据库开销,主要是全栈协同逻辑开发)
收费模式B2B SaaS 订阅模式(按团队席位/月收费),提供私有化部署版本(按年买断或服务费)
竞争风险成熟企业大多直接采用自建内网 DNS(如 CoreDNS/dnsmasq)解决环境解析问题,可能绕开客户端 hosts 方案。
依据 AI推测

DevNet Box:集成 hosts 的一体化开发者本地网络工具箱

产品构想在 hosts 切换的基础上,整合轻量 DNS 代理、本地 Mock 服务、跨设备局域网调试及代理分流规则,打造一站式开发者网络工作台。
核心功能Hosts快速切换、轻量Local DNS Server、端口转发与映射检测、一键抓包代理联动、环境变量注入
目标用户Web开发人员、移动端开发人员、爬虫工程师
难度/周期高 · 3-5个月 · 成本:中(涉及跨平台底层网络协议处理与持续维护)
收费模式Freemium模式,基础功能免费,高级网络分析/模拟功能按专业版买断(如 License Key 销售)
竞争风险市场上有 Charles、Proxyman、Whistle 等成熟强大的网络调试工具,竞争激烈。
依据 数据支持的判断

开源衍生品赞助与轻量定制支持(生态维护模式)

产品构想保持开源客户端免费,通过赞助位广告、定制企业专属客户端构建(例如内嵌企业内部源、预置内网证书与配置)提供外包服务。
核心功能开源版品牌定制、企业私有配置固化构建、客户端启动页与推荐位广告展示
目标用户有定制内嵌网络工具需求的外包团队或传统IT企业、面向开发者的SaaS服务商(广告赞助商)
难度/周期低 · 2-4周 · 成本:极低
收费模式客户端/官网广告赞助费、企业打包定制服务费(单次收取)
竞争风险收入上限很低且不稳定,过度商业化可能引起开源社区抵触。
依据 已验证事实
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

项目中文简介Stars语言
microsoft/vscode 中文介绍暂未生成
Visual Studio Code
195,266 TypeScript
electron/electron 中文介绍暂未生成
:electron: Build cross-platform desktop apps with JavaScript
123,842 C++
microsoft/playwright 中文介绍暂未生成
Playwright is a framework for Web Testing and Automation. It
99,785 TypeScript
toeverything/AFFiNE 中文介绍暂未生成
There can be more than Notion and Miro. AFFiNE(pronounced [ə
74,424 TypeScript
jgraph/drawio-desktop 中文介绍暂未生成
Official electron build of draw.io
63,925 JavaScript
marktext/marktext 中文介绍暂未生成
📝A simple and elegant markdown editor, available for Linux,
63,831 TypeScript
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。

项目优势与风险

技术成熟度创建于 2011-09-02,近 30 天仍在推送,发布过 61 个 Release
社区活跃Star 27,396 / Fork 2,689 / Issue 395(数据支持,可自行核实)
许可证Apache-2.0
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

快速开始(以仓库 README 为准)
git clone https://github.com/oldj/SwitchHosts.git
cd SwitchHosts
# 请阅读仓库 README 获取确切安装步骤(依赖、配置、启动命令)
阅读原仓库文档
术语说明:Docker=应用容器(把程序和依赖打包运行);API Key=调用外部服务的密钥;Git Clone=把仓库代码下载到本地。常见错误:API Key 未配置 / 端口占用 / 数据库连接失败,多数项目在 README 的 Troubleshooting 章节有说明。