Skip to content

SwitchHosts Release Notes

oldj / SwitchHosts contributors · Manage and switch local, remote and grouped hosts-file configurations with syntax highlighting, scheduled refresh, import/export and a system tray interface.

CaskNetworking 27.5K
Install command
brew install --cask switchhosts
30-day installs
305
#578 in App
1-year installs
3.8K
Last 365 days
Latest version
5.0.3
Download size
4.7MB
dmg
Release cadence
Irregular
0 releases in 30 days
  1. 5.0.3

    LatestPatch

    OpenNavo editorial Added to Homebrew

    Adds batch DoH resolution, import previews and history controls, with macOS tray and hosts-switching fixes.

    • Resolves domains into hosts entries with batch DNS-over-HTTPS lookups and cached-IP fallback.
    • Previews file/URL imports with selective append or confirmed replacement, preserving folders and references.
    • Adds history retention controls and live HTTP API port changes.
    • Opens comment links with Cmd+Click on macOS.
    • Fixes toggle/content synchronization, import validation and stale domain-refresh results.
    • Fixes tray popups over full-screen apps and clicks on macOS 27.

    Official release

  2. 5.0.3-beta.3

    Pre-release

    GitHub Release

    2026-10-05 · Changes since v5.0.3-beta.2

    New Features

    • Add batch domain resolution for remote hosts, with multiline input, per-domain results, concurrent lookups, and cached-IP fallback.
    • Add import previews for files and URLs, with selective append and full replacement options, folder structure preservation, reference remapping, and confirmation before replacement. (#295)
    • Add system hosts history controls: enable or disable recording, configure retention limits, view saved-record counts, and clear history with confirmation. (#1050)
    • Support configurable HTTP API listening ports without restarting, with service status and clear port-conflict errors. Update the Alfred workflow to support custom ports. (#767)
    • Support opening HTTP(S) links in hosts comments with Cmd-click on macOS or Ctrl-click on Windows/Linux.

    Editor and Interface

    • Highlight managed hosts section boundaries and add labels that remain visible during horizontal scrolling.
    • Refine syntax highlighting with purple accents and softer line numbers; improve selected-text and read-only colors, and unify controls with the red theme.
    • Improve sidebar action placement and simplify the trash indicator.
    • Refine the tray popup layout and calculate its initial height from visible entries.
    • Vertically center the macOS window controls.

    Bug Fixes and Reliability

    • Keep hosts toggle states consistent with applied content, including HTTP API operations, failed saves, and recovery.
    • Improve BOM, UTF-16, and legacy Windows ANSI handling. Back up original bytes before encoding conversion, restore exact bytes during rollback, preserve editor offsets, and reject invalid content before writing. (#302)
    • Restore Alt-drag column selection and correct comment toggling across multiple selections. (#1061)
    • Strengthen backup validation, preserve imported metadata, and allow retries after import failures or preview refreshes.
    • Fix history settings being rolled back during recovery failures, and improve history refresh and retry behavior.
    • Restore tray popup click handling on macOS 27.
    • Allow titlebar dragging while modal overlays are open.
    • Provide clearer errors for invalid remote URLs, TLS certificate failures, timeouts, and connection problems, while avoiding sensitive details in error messages. (#588)
    • Bound batch DNS refreshes with domain and time limits, protect refresh metadata from stale responses, and improve background failure reporting.

    Localization

    • Add Spanish, Italian, Dutch, Portuguese, Vietnamese, Russian, and Thai.
    • Redesign the language selector with a themed, responsive multi-column menu.

    Development and Maintenance

    • Upgrade frontend and Rust dependencies, update CI and release actions, and move CI/release builds to Node.js 24.
    • Add a VS Code launch configuration for Tauri development and expand regression coverage.
    • Update homepage links to switchhosts.app. (#1059)

    2026-10-05 · 自 v5.0.3-beta.2 以来的修改

    新增功能

    • 远程 hosts 支持批量域名解析,可按行输入多个域名,查看逐项解析结果,并支持并发查询和缓存 IP 回退。
    • 从文件或 URL 导入时支持预览,可选择部分配置追加导入,或替换全部配置;保留文件夹结构、重新映射引用关系,并在替换前要求确认。 (#295)
    • 新增系统 hosts 历史记录管理:支持开启或关闭记录、设置保留数量、查看已保存记录数,以及确认后清空历史记录。 (#1050)
    • HTTP API 支持自定义监听端口,保存后无需重启,并显示运行状态及明确的端口冲突提示;Alfred 工作流同步支持自定义端口。 (#767)
    • 支持打开 hosts 注释中的 HTTP(S) 链接:macOS 使用 Cmd + 单击,Windows/Linux 使用 Ctrl + 单击。

    编辑器与界面

    • 高亮显示托管 hosts 内容的起止边界,并添加横向滚动时仍保持可见的标签。
    • 优化语法高亮,采用紫色强调色并降低行号的视觉干扰;改善选中文本和只读内容的配色,统一控件与红色主题的表现。
    • 调整侧边栏操作入口的位置,简化回收站提示标记。
    • 优化托盘弹窗布局,根据可见条目数量计算初始高度。
    • 修正 macOS 窗口控制按钮的垂直居中位置。

    问题修复与可靠性

    • 修复 hosts 开关状态与实际生效内容不一致的问题,完善 HTTP API 切换、保存失败和恢复流程中的状态同步。
    • 改善 BOM、UTF-16 和 Windows 传统 ANSI 编码的处理;转换编码前备份原始字节,回滚时精确恢复,保留编辑器文本偏移,并在写入前拒绝无效内容。 (#302)
    • 恢复 Alt + 拖动列选择,修正多选区下的注释切换行为。 (#1061)
    • 加强备份文件校验,保留导入元数据,并支持在导入失败或刷新预览后重试。
    • 修复恢复失败时历史记录设置被回退的问题,完善历史记录刷新和重试机制。
    • 修复 macOS 27 上托盘弹窗无法响应点击的问题。
    • 修复弹出模态窗口后无法通过标题栏拖动主窗口的问题。
    • 为无效远程 URL、TLS 证书错误、请求超时和连接失败提供更明确的提示,并避免在错误信息中暴露敏感细节。 (#588)
    • 为批量 DNS 刷新增加域名数量和执行时间限制,防止过期响应覆盖刷新元数据,并完善后台刷新失败的记录。

    多语言支持

    • 新增西班牙语、意大利语、荷兰语、葡萄牙语、越南语、俄语和泰语。
    • 重新设计语言选择菜单,支持主题适配和响应式多列布局。

    开发与维护

    • 升级前端及 Rust 依赖,更新 CI 和发布工作流中的 Actions,并将 CI 与发布构建环境升级至 Node.js 24。
    • 新增用于 Tauri 开发的 VS Code 启动配置,并扩展回归测试覆盖。
    • 将项目主页链接更新为 switchhosts.app。 (#1059)

    Full Changelog: https://github.com/oldj/SwitchHosts/compare/v5.0.3-beta.2...v5.0.3-beta.3

  3. 5.0.3-beta.2

    Pre-release

    GitHub Release

    What's Changed

    New Contributors

    Full Changelog: https://github.com/oldj/SwitchHosts/compare/v5.0.3-beta.1...v5.0.3-beta.2

  4. 5.0.3-beta.1

    Expand

    GitHub Release

    What's Changed

    New Contributors

    Full Changelog: https://github.com/oldj/SwitchHosts/compare/v5.0.1...v5.0.3-beta.1

  5. 5.0.2

    Expand

    OpenNavo editorial Added to Homebrew

    Updates react-router to 7.15.1, Vite to 8.0.16 and undici to 7.28.0.

    Changes
    Updates react-router to 7.15.1, Vite to 8.0.16 and undici to 7.28.0.

    What's Changed

    Full Changelog: https://github.com/oldj/SwitchHosts/compare/v5.0.1...v5.0.2

    Official source: https://github.com/oldj/SwitchHosts/releases/tag/v5.0.2 Homebrew version evidence: https://github.com/Homebrew/homebrew-cask/commit/851fd28122cd3d674308f99a0893fec38d612b74

  6. 5.0.1

    Expand

    OpenNavo editorial Added to Homebrew

    Adds Lightweight Mode, custom data storage and a macOS privileged Helper; improves tray lifecycle and fixes launch visibility, data recovery and release workflow issues.

    Changes
    Adds Lightweight Mode, custom data storage and a macOS privileged Helper; im...

    New Features

    • Added “Lightweight Mode”: closing the main window can now release WebView memory, useful for users who want lower background resource usage.
    • Restored custom data storage location: choose a data directory, migrate existing data, and reset back to the default location.
    • Added a privileged background Helper on macOS to reduce repeated admin password prompts when writing to /etc/hosts. (If the Helper has issues, you can open macOS “Login Items” settings directly to approve or re-enable it.)
    • Added a “Quit app when closing the main window” option, better matching Windows users’ expectations.

    Experience Improvements

    • Optimized tray window creation and destruction to reduce resource usage while running in the background.
    • Long update changelogs are now scrollable instead of being truncated.
    • Added a title to the Import URL dialog; modal titles are now bold globally for better readability.
    • Added a default path tooltip to the data directory recovery dialog to help avoid accidental actions.
    • Reordered items in General settings and improved multilingual copy.

    Bug Fixes

    • Fixed an issue where the Windows/Linux title-bar close button did not correctly trigger Lightweight Mode memory release.
    • Fixed an issue where the tray mini window could close immediately after opening on Windows/Linux.
    • Fixed an issue where the main window could still appear on macOS login even when “Hide at launch” was enabled.
    • Strengthened the recovery flow for custom data directories when they are damaged, missing, or referenced by an invalid pointer.
    • Fixed a brief flash of default data that could appear during data directory recovery.
    • Fixed a release workflow race condition where multiple build jobs could create the draft Release concurrently.

    Dependencies and Internal Improvements

    • Updated multiple frontend, backend, and Rust dependencies, including Electron, Vite, Hono, Axios, Lodash, React, Mantine, Vitest, Sass, and more.
    • Updated security-related indirect dependencies, including picomatch, @xmldom/xmldom, follow-redirects, rustls-webpki, tar, and more.
    • Added test coverage for window lifecycle, Lightweight Mode, tray behavior, data directory recovery, and configuration update failure paths.
    • Improved macOS Helper diagnostic logging, making background component issues easier to inspect through system logs.

    Full Changelog: https://github.com/oldj/SwitchHosts/compare/v5.0.0...v5.0.1

    Official source: https://github.com/oldj/SwitchHosts/releases/tag/v5.0.1 Homebrew version evidence: https://github.com/Homebrew/homebrew-cask/commit/bc57d821269a4911dc94d71c886952ee64f93f14

  7. 5.0.1-beta.8

    Expand

    GitHub Release

    v5.0.1-beta.8

    Added

    • Restored custom data storage location support, with options to change or reset the data directory in Advanced settings.
    • Added an option to copy existing data when changing the data directory, with a warning if the target already contains data.
    • Added a startup recovery dialog when the custom data directory is missing, unavailable, or has a damaged location record.

    Improved

    • Update dialog changelogs now scroll instead of being truncated.
    • Added a title to the import-from-URL dialog and improved modal title styling.

    Fixed

    • Fixed cases where SwitchHosts could accidentally fall back to the default data directory when the custom location was unavailable.
    • Blocked data writes, remote refresh, HTTP API, tray mini window, and related actions from bypassing the recovery flow.
    • Added stronger validation before switching data directories to avoid restarting into an unusable location.

    Dependencies

    • Updated Rust dependency tar from 0.4.45 to 0.4.46.

    v5.0.1-beta.8

    新增

    • 恢复自定义数据存储位置功能,可在高级设置中更改或重置数据目录。
    • 更改数据目录时支持复制现有数据,并在目标目录已有数据时提示覆盖风险。
    • 当自定义数据目录丢失、不可用或记录损坏时,启动时会显示恢复对话框。

    优化

    • 更新弹窗的 changelog 支持滚动显示,避免长内容被截断。
    • 导入 URL 弹窗新增标题,弹窗标题样式更清晰。

    修复

    • 修复自定义数据目录异常时可能误用默认目录的问题。
    • 恢复状态下会阻止数据写入、远程刷新、HTTP API、托盘迷你窗口等操作绕过恢复流程。
    • 增强数据目录切换前的可用性检查,避免保存无效目录后启动失败。

    依赖

    • 升级 Rust 依赖 tar:0.4.45 → 0.4.46。

    Full Changelog: https://github.com/oldj/SwitchHosts/compare/v5.0.1-beta.7...v5.0.1-beta.8

  8. 5.0.1-beta.7

    Expand

    GitHub Release

    Changelog

    Added

    • Added a macOS background helper that can write to /etc/hosts silently after one-time authorization, reducing repeated password prompts during automatic remote hosts updates.
    • Added background helper management in General settings, including status, install, reinstall, and remove actions.
    • Added an “Open System Settings” button to help users approve the helper in macOS Login Items.

    Improved

    • macOS hosts applying now tries the background helper first, then automatically falls back to the existing system authorization flow if the helper is unsupported, unavailable, or fails.
    • Added safety checks to the helper write flow and restricted privileged writes to /etc/hosts only.
    • Improved macOS login startup behavior to avoid unexpectedly showing a previously hidden main window.

    Fixed

    • Fixed background helper XPC signature validation failures on macOS 26.
    • Fixed possible concurrent helper unregister/register operations when repeatedly triggering helper repair.
    • Fixed macOS universal builds failing to package the background helper binary correctly.

    修改日志

    新增

    • 新增 macOS 后台助手,可在一次授权后静默写入系统 /etc/hosts,减少自动更新远程 hosts 时反复输入密码的情况。
    • 在通用设置中新增后台助手管理入口,支持查看状态、安装、重新安装、移除。
    • 新增“打开系统设置”按钮,方便用户前往 macOS“登录项”中批准后台助手。

    改进

    • macOS 应用 hosts 时优先使用后台助手;当后台助手不可用、不受支持或写入失败时,自动回退到原有系统授权流程。
    • 后台助手写入流程增加安全校验,并固定只允许写入 /etc/hosts。
    • 优化 macOS 登录启动行为,避免登录恢复时意外显示已隐藏的主窗口。

    修复

    • 修复 macOS 26 下后台助手 XPC 签名校验失败导致无法连接的问题。
    • 修复重复点击后台助手修复操作时可能触发并发注册/注销的问题。
    • 修复 macOS universal 构建中后台助手二进制未正确打包的问题。

    Full Changelog: https://github.com/oldj/SwitchHosts/compare/v5.0.1-beta.4...v5.0.1-beta.7

  9. 5.0

    Expand

    OpenNavo editorial Added to Homebrew

    Migrates from Electron to Tauri 2, introduces layered data storage and CodeMirror 6, rebuilds updates and native privilege handling, and redesigns the interface and preferences.

    Changes
    Migrates from Electron to Tauri 2, introduces layered data storage and CodeM...

    Update List

    • Core Architecture Migrated to Tauri 2: Migrated from an Electron main process to a Rust/Tauri backend, added the complete src-tauri implementation, and removed the old Electron main process code, packaging scripts, and electron-builder workflow.
    • New v5 Data Structure: Data is now stored in separate layers: manifest.json, entries/, trashcan.json, internal/config.json, and internal/histories/. README backup instructions were updated accordingly.
    • Compatible Migration, Import, and Export: Supports first-run migration from legacy PotDb data; manual import now supports v3, v4, and v5 backups; exports now use the v5 backup JSON format with timestamped filenames.
    • System Hosts Writing Reworked: Switched to native system privilege flows: Security.framework on macOS, pkexec on Linux, and UAC self-elevation on Windows. The in-app sudo password input was removed.
    • New/Reworked Auto Update System: Integrated Tauri updater, with background update checks, manual download/install, proxy support for update requests, and generated/published latest.json.
    • Rebuilt CI and Release Pipeline: Added GitHub Actions CI and Release workflows. Releases now run the full test suite before publishing and support signed/validated builds for macOS universal/arm64/x64, Windows x64/x86/arm64, and Linux x64/arm64.
    • Editor Upgraded to CodeMirror 6: Improved large-file performance, syntax highlighting, line numbers, read-only mode, history snapshot rendering, and cursor/display stability.
    • Enhanced Remote Hosts Refresh: Added startup refresh support, response size limits, and CRLF/LF normalization.
    • Improved System Tray Behavior: Fixed macOS focus handling, multi-monitor positioning, rounded corners, and interaction issues.
    • Major Main UI Redesign: Added a left activity bar, Hosts/Trashcan view switching, resizable left and right panels, a right-side details panel, centered title bar, frameless window, and cross-platform window controls.
    • Right Details Panel: Shows the current hosts type, rule count, remote URL, refresh interval, last refresh time, group contents, and folder selection mode; trashcan items can be restored or permanently deleted from the panel.
    • Unified Trashcan Experience: Moved the trashcan entry to the left sidebar, with item count display, restore, permanent delete, clear, and details panel operations.
    • Preferences Reworked: Split preferences into General, Commands, Proxy, and Advanced tabs. General and Advanced settings auto-save, while Commands and Proxy keep manual save status feedback.
    • New Preference Options: Added system theme by default, launch at login, and refresh remote hosts on startup.
    • Enhanced Proxy Support: Added socks5 proxy protocol support, and both remote hosts refresh and app updates can now use proxy settings.
    • Local HTTP API Preserved and Migrated: Reimplemented the 50761 API with Rust/Axum, supporting /api/list and /api/toggle; when port binding fails, the setting is rolled back and the user is notified.
    • Localization and Copy Updates: Organized and sorted locale keys, fixed language preference fallback display, localized menus and find window text, and updated multilingual README screenshots and v5 documentation.
    • Stability Fixes: Fixed concurrent config writes, HTTP API startup failure state, invisible window after hiding the Dock icon, stuck hover state after drag, titlebar/tray switch synchronization, long title truncation, loading screen lockups, and more.
    • Expanded Test Coverage: Added Playwright e2e tests, Rust tests, and frontend component/model unit tests covering preferences, import/export, remote hosts, local hosts, trashcan, title bar, tree operations, find/replace, and more.
    • Toolchain Upgrades: Upgraded to Vite 8, TypeScript 6, Mantine 9, Vitest 4, and Tauri 2.11, and introduced ESLint 10 with naming convention rules.
    • Development and Build Command Changes: Development now uses npm run tauri:dev; production builds use npm run tauri:build; build artifacts are now located under src-tauri/target/release/bundle/.
    • Removed Legacy Electron Content: Removed src/main/*, the Electron updater, old upload/packaging scripts, old main-process tests, and vite.main.config.mts.

    Full Changelog: https://github.com/oldj/SwitchHosts/compare/v4.3.0...v5.0.0

    Official source: https://github.com/oldj/SwitchHosts/releases/tag/v5.0.0 Homebrew version evidence: https://github.com/Homebrew/homebrew-cask/commit/4b137508c58b95be554ed631b6e90cf96b51c515

  10. 4.3.0-prerelease

    Expand

    GitHub Release

    SwitchHosts v4.3.0

    What's Changed

    • Updated dependencies
    • Migrated UI components from Chakra UI to Mantine
    • Switched to CodeJar for hosts content editing
    • Replaced Express with Hono.js for API implementation
    • Miscellaneous improvements and fixes

    New Contributors

    Full Changelog: https://github.com/oldj/SwitchHosts/compare/v4.2.0...v4.3.0

  11. 4.2.0.6119
  12. 4.2.0

    Expand

    GitHub Release

    What's Changed

    New Contributors

    Full Changelog: https://github.com/oldj/SwitchHosts/compare/v4.1.2...v4.2.0

  13. 4.2.0-beta

    Expand

    GitHub Release

    What's Changed

    New Contributors

    Full Changelog: https://github.com/oldj/SwitchHosts/compare/v4.1.2...v4.2.0-beta

  14. 4.1.2

    Expand

    GitHub Release

    What's Changed

    New Contributors

    Full Changelog: https://github.com/oldj/SwitchHosts/compare/v4.1.1...v4.1.2

  15. 4.1.2-beta

    Expand

    GitHub Release

    What's Changed

    New Contributors

    Full Changelog: https://github.com/oldj/SwitchHosts/compare/v4.1.1...v4.1.2-beta