github oldj/SwitchHosts v5.0.1
SwitchHosts v5.0.1

8 hours ago

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.

新增功能

  • 新增“轻量模式”:关闭主窗口时可释放 WebView 内存,适合希望降低后台占用的用户。
  • 恢复自定义数据存储位置:可选择数据目录、迁移现有数据,并支持重置回默认位置。
  • macOS 新增后台提权 Helper:写入 /etc/hosts 时减少反复弹出管理员密码的情况。(Helper 异常时可直接打开 macOS “登录项”设置,便于批准或重新启用后台组件。)
  • 新增“关闭主窗口时退出应用”选项,兼顾 Windows 用户的使用习惯。

改进体验

  • 优化托盘窗口创建与销毁逻辑,减少隐藏运行时的资源占用。
  • 长更新日志弹窗现在可滚动查看,不再被截断。
  • 导入 URL 弹窗新增标题;全局弹窗标题加粗,更易识别。
  • 数据目录恢复弹窗增加默认路径提示,避免误操作。
  • 调整“通用设置”项目顺序,并完善多语言文案。

修复问题

  • 修复 Windows/Linux 标题栏关闭按钮未正确触发轻量模式释放内存的问题。
  • 修复托盘迷你窗口在 Windows/Linux 上刚打开就关闭的问题。
  • 修复 macOS 登录启动时,在“启动时隐藏”开启后主窗口仍可能显示的问题。
  • 加强自定义数据目录损坏、丢失、无效指针等场景的恢复流程。
  • 修复恢复数据目录时可能短暂显示默认数据的问题。
  • 修复发布流程中多个构建任务并发创建草稿 Release 的竞态问题。

依赖与内部改进

  • 更新多项前端、后端与 Rust 依赖,包括 Electron、Vite、Hono、Axios、Lodash、React、Mantine、Vitest、Sass 等。
  • 更新安全相关间接依赖,包括 picomatch@xmldom/xmldomfollow-redirectsrustls-webpkitar 等。
  • 增加窗口生命周期、轻量模式、托盘行为、数据目录恢复、配置更新失败路径等测试覆盖。
  • 改进 macOS Helper 诊断日志,现在可通过系统日志排查后台组件问题。

Full Changelog: v5.0.0...v5.0.1

Don't miss a new SwitchHosts release

NewReleases is sending notifications on new releases.