## File: README.md

---

# SwitchHosts

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

Homepage: [https://switchhosts.vercel.app](https://switchhosts.vercel.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



## 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.

## Develop and build

### Prerequisites

- [Node.js](https://nodejs.org/)
- [Rust](https://www.rust-lang.org/tools/install)
- Tauri system dependencies, see [Tauri Prerequisites](https://v2.tauri.app/start/prerequisites/)

### Development

- Run `npm install` to install dependencies
- Run `npm run tauri:dev` to start the app in development mode

### Build and package

- Run `npm run tauri:build` to create a production build
- The packaged files will be in `./src-tauri/target/release/bundle/`

```bash
# development
npm run tauri:dev

# production build
npm run tauri:build
```

## Copyright

SwitchHosts is a free and open source software, it is released under the [Apache License](./LICENSE).

---

## File: README.pl.md

---

# SwitchHosts

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

Strona główna: [https://switchhosts.vercel.app](https://switchhosts.vercel.app)

SwitchHosts to aplikacja do zarządzania plikiem hosts, zbudowana na bazie [Tauri](https://tauri.app/), [React](https://facebook.github.io/react/), [Jotai](https://jotai.org/), [Mantine](https://mantine.dev/) i innych.

## Zrzut ekranu



## Funkcje

- Zarządzanie wpisami hosts: systemowymi, lokalnymi, zdalnymi, grupami i folderami
- Szybkie przełączanie hosts z głównego okna lub zasobnika systemowego
- Podświetlanie składni plików hosts
- Wyszukiwanie i zamiana w wielu wpisach hosts
- Ręczne, zaplanowane lub startowe odświeżanie zdalnych hosts
- Import i eksport danych hosts, w tym import kopii zapasowej z URL
- Przenoszenie wpisów do kosza oraz późniejsze przywracanie lub trwałe usuwanie
- Preferencje dla trybu zapisu, proxy, sprawdzania aktualizacji, uruchamiania przy logowaniu, polecenia po zastosowaniu i lokalnego HTTP API

## Instalacja

### Pobieranie

Możesz pobrać kod źródłowy i zbudować go samodzielnie, lub pobrać wbudowaną wersję z poniższych linków:

- [Pobierz najnowszą wersję SwitchHosts (GitHub release)](https://github.com/oldj/SwitchHosts/releases)

Możesz także zainstalować build używając [menedżera pakietów Chocolatey](https://community.chocolatey.org/packages/switchhosts):
```powershell
choco install switchhosts
```

## Kopia zapasowa

SwitchHosts przechowuje dane w `~/.SwitchHosts` (lub folder `.SwitchHosts` w ścieżce domowej bieżącego użytkownika na Windows). Układ danych v5:

- `~/.SwitchHosts/manifest.json` przechowuje drzewo hosts
- `~/.SwitchHosts/entries/` przechowuje zawartość lokalnych i zdalnych hosts
- `~/.SwitchHosts/trashcan.json` przechowuje wpisy kosza
- `~/.SwitchHosts/internal/config.json` przechowuje preferencje
- `~/.SwitchHosts/internal/histories/` przechowuje historię systemowego pliku hosts i uruchomień poleceń

Aby wykonać pełną ręczną kopię zapasową, skopiuj cały folder `~/.SwitchHosts`. Eksport w aplikacji tworzy JSON z kopią zapasową danych hosts; nie zawiera preferencji ani historii.

## Tworzenie i budowanie

### Wymagania wstępne

- [Node.js](https://nodejs.org/)
- [Rust](https://www.rust-lang.org/tools/install)
- Zależności systemowe Tauri, zobacz [Wymagania Tauri](https://v2.tauri.app/start/prerequisites/)

### Tworzenie

- Uruchom `npm install` aby zainstalować zależności
- Uruchom `npm run tauri:dev` aby uruchomić aplikację w trybie deweloperskim

### Budowanie i pakowanie

- Uruchom `npm run tauri:build` aby utworzyć wersję produkcyjną
- Spakowane pliki będą w `./src-tauri/target/release/bundle/`

```bash
# tworzenie
npm run tauri:dev

# budowanie produkcyjne
npm run tauri:build
```

## Prawa autorskie

SwitchHosts to wolne i otwarte oprogramowanie, wydane na licencji [Apache License](./LICENSE).

---

## File: README.zh_hans.md

---

# SwitchHosts

- [English](README.md)
- [Polski](README.pl.md)
- [繁體中文](README.zh_hant.md)

项目主页：[https://switchhosts.vercel.app](https://switchhosts.vercel.app)

SwitchHosts 是一个管理 hosts 文件的应用，基于 [Tauri](https://tauri.app/)、[React](https://facebook.github.io/react/)、[Jotai](https://jotai.org/)、[Mantine](https://mantine.dev/) 等技术开发。

## 截图



## 功能特性

- 管理系统、本地、远程、组合和文件夹 hosts 条目
- 可在主窗口或系统托盘快速切换 hosts 方案
- hosts 文件语法高亮
- 跨 hosts 条目查找和替换
- 支持手动、定时或启动时刷新远程 hosts
- 导入/导出 hosts 数据，并支持从 URL 导入备份
- 将条目移入回收站，并可稍后恢复或彻底删除
- 偏好设置支持写入模式、代理、更新检查、开机启动、应用后命令和本地 HTTP API

## 安装

### 下载

你可以下载源码并自行构建，也可以从以下地址下载已构建好的版本：

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

你也可以通过 [Chocolatey 包管理器](https://community.chocolatey.org/packages/switchhosts)安装已构建好的版本：
```powershell
choco install switchhosts
```

## 数据备份

SwitchHosts 的数据文件存储于 `~/.SwitchHosts` (Windows 下存储于用户个人文件夹下的 `.SwitchHosts` 文件夹），
v5 数据结构如下：

- `~/.SwitchHosts/manifest.json` 存储 hosts 树
- `~/.SwitchHosts/entries/` 存储本地和远程 hosts 内容
- `~/.SwitchHosts/trashcan.json` 存储回收站条目
- `~/.SwitchHosts/internal/config.json` 存储偏好设置
- `~/.SwitchHosts/internal/histories/` 存储系统 hosts 和命令运行历史

如需完整手动备份，请复制整个 `~/.SwitchHosts` 文件夹。应用内导出会生成 hosts 数据备份 JSON，不包含偏好设置或历史记录。

## 开发以及构建

### 前置要求

- [Node.js](https://nodejs.org/)
- [Rust](https://www.rust-lang.org/tools/install)
- Tauri 系统依赖，参见 [Tauri 前置要求](https://v2.tauri.app/start/prerequisites/)

### 开发

- 运行 `npm install` 安装依赖
- 运行 `npm run tauri:dev` 启动开发模式

### 构建及打包

- 运行 `npm run tauri:build` 进行生产构建
- 打包后的文件位于 `./src-tauri/target/release/bundle/`

```bash
# 开发
npm run tauri:dev

# 生产构建
npm run tauri:build
```

## 版权

SwitchHosts 是一个免费开源软件，基于 Apache-2.0 协议发布。

---

## File: README.zh_hant.md

---

# SwitchHosts

- [English](README.md)
- [Polski](README.pl.md)
- [简体中文](README.zh_hans.md)

項目主頁：[https://switchhosts.vercel.app](https://switchhosts.vercel.app)

SwitchHosts 是一個管理 hosts 檔案的應用程式，基於 [Tauri](https://tauri.app/)、[React](https://facebook.github.io/react/)、[Jotai](https://jotai.org/)、[Mantine](https://mantine.dev/) 等技術開發。

## 螢幕截圖



## 功能特性

- 管理系統、本機、遠端、組合和資料夾 hosts 項目
- 可在主視窗或系統選單列圖示快速切換 hosts 方案
- hosts 檔案語法高亮顯示
- 跨 hosts 項目尋找和取代
- 支援手動、定時或啟動時重新整理遠端 hosts
- 匯入/匯出 hosts 資料，並支援從 URL 匯入備份
- 將項目移入回收站，並可稍後還原或永久刪除
- 偏好設定支援寫入模式、代理、更新檢查、開機啟動、套用後命令和本機 HTTP API

## 安裝

### 下載

你可以下載原始碼並自行建置，也可以從以下網址下載已經建置好的版本：

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

你也可以通過 [Chocolatey 包管理器](https://community.chocolatey.org/packages/switchhosts)安裝已經建置好的版本：

```powershell
choco install switchhosts
```

## 數據備份

SwitchHosts 的數據文件儲存於 `~/.SwitchHosts` (Windows 下儲存使用者個人文件裡的 `.SwitchHosts` 資料夾），
v5 數據結構如下：

- `~/.SwitchHosts/manifest.json` 儲存 hosts 樹
- `~/.SwitchHosts/entries/` 儲存本機和遠端 hosts 內容
- `~/.SwitchHosts/trashcan.json` 儲存回收站項目
- `~/.SwitchHosts/internal/config.json` 儲存偏好設定
- `~/.SwitchHosts/internal/histories/` 儲存系統 hosts 和命令執行歷史

如需完整手動備份，請複製整個 `~/.SwitchHosts` 資料夾。應用程式內匯出會產生 hosts 資料備份 JSON，不包含偏好設定或歷史記錄。

## 開發及建置

### 前置要求

- [Node.js](https://nodejs.org/)
- [Rust](https://www.rust-lang.org/tools/install)
- Tauri 系統依賴，參見 [Tauri 前置要求](https://v2.tauri.app/start/prerequisites/)

### 開發

- 執行 `npm install` 安裝依賴
- 執行 `npm run tauri:dev` 啟動開發模式

### 建置及打包

- 執行 `npm run tauri:build` 進行生產建置
- 打包後的檔案位於 `./src-tauri/target/release/bundle/`

```bash
# 開發
npm run tauri:dev

# 生產建置
npm run tauri:build
```

## 版權聲明

SwitchHosts 是一個免費開源軟體，基於 Apache-2.0 開源協議發佈。