2026-11-05 06:05:21 +00:00
|
|
|
|
# Squid
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
**给你的电脑洗个澡。**
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
Squid 是面向 macOS 与 Windows 的本地系统维护工具:清理可重建的缓存与系统垃圾、卸载应用并处理残留、清理项目构建产物、分析磁盘占用,以及实时查看系统状态。
|
2026-11-05 03:40:42 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
桌面端、命令行与 TUI 共用同一套 Rust 扫描和删除引擎。清理规则、安全边界、删除账本与配置只维护一份,不依赖云端服务,也不需要 root。
|
2026-11-05 03:40:42 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
## 产品组成
|
2026-11-05 03:40:42 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
| 入口 | 技术栈 | 二进制 |
|
|
|
|
|
|
| --- | --- | --- |
|
|
|
|
|
|
| 桌面应用 | Tauri 2 + React 19 + TypeScript + Vite 6 | `squid-desktop` |
|
|
|
|
|
|
| 命令行 | Rust + clap | `squid` |
|
|
|
|
|
|
| 终端界面 | Rust + ratatui + crossterm | `squid state` |
|
2026-11-05 03:40:42 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
桌面端支持 macOS 12+ 与 Windows 10/11 x64;CLI/TUI 使用同一个 Rust workspace。
|
2026-11-05 03:40:42 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
## 功能
|
2026-11-05 03:40:42 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
| 功能 | 说明 |
|
|
|
|
|
|
| --- | --- |
|
|
|
|
|
|
| 电脑概览 | 磁盘健康、常用操作入口与 CPU、内存、存储摘要 |
|
|
|
|
|
|
| 日常清理 | macOS 38 条 / Windows 30 条内置规则,覆盖应用与浏览器缓存、日志、崩溃报告、开发缓存与废纸篓等 |
|
|
|
|
|
|
| 应用卸载 | 按名称定位应用,把应用本体与偏好、缓存、容器或 AppData 残留组成同一个卸载计划 |
|
|
|
|
|
|
| 深度清理 | 查找 `node_modules` 等可重建构建产物、磁盘镜像、安装包和陈旧下载,并保护近期仍在使用的项目 |
|
|
|
|
|
|
| 存储空间 | 逐层测量目录、查看最大子项与最大文件 |
|
|
|
|
|
|
| 实时监控 | 每两秒采样 CPU、内存、网络、磁盘、电池、卷和高占用进程,可确认后结束进程 |
|
|
|
|
|
|
| 历史与撤销 | 每次真实删除写入本地账本;仍在废纸篓或回收站中的内容可以还原 |
|
|
|
|
|
|
| 系统更新 | 从发布分支检查、校验、下载并安装新版本 |
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
界面支持中文和英文,跟随 Squid 的语言设置与系统语言。
|
2026-10-15 02:05:34 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
## 桌面应用
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
### 左侧菜单
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
- **维护**:电脑概览、日常清理、应用卸载、深度清理
|
|
|
|
|
|
- **洞察**:存储空间、实时监控
|
|
|
|
|
|
- **底部**:历史记录、设置
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
`⌘1`–`⌘8`(macOS)或 `Ctrl+1`–`Ctrl+8`(Windows)可以直接切换页面。
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
### 常驻托盘
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
关闭主窗口只会隐藏窗口,Squid 进程继续运行。托盘菜单提供:
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
- 打开 Squid
|
|
|
|
|
|
- 日常清理
|
|
|
|
|
|
- 应用卸载
|
|
|
|
|
|
- 深度清理
|
|
|
|
|
|
- 退出 Squid
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
再次打开应用、双击应用图标或通过单实例唤起时,会恢复并聚焦主窗口。只有选择“退出 Squid”才会结束进程。
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
### 软件更新
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
- 设置中的系统信息面板始终显示当前系统版本、架构与 Squid 版本。
|
|
|
|
|
|
- 只有检测到更高版本时,才显示版本变化和更新说明;已经是最新版本时不显示额外提示。
|
|
|
|
|
|
- 自动检查默认开启,每天最多检查一次。
|
|
|
|
|
|
- 安装包必须通过 SHA256 与文件大小校验;带发布公钥的构建还会校验清单的 Ed25519 签名。
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
### 权限与隐私
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
- 首次启动会显示一次可选的全盘访问检查,不会强制弹出 macOS 权限窗口,也不会阻止应用启动。
|
|
|
|
|
|
- “设置 → 系统权限”提供权限状态检查和打开“系统设置 → 隐私与安全性 → 全盘访问”的入口。
|
|
|
|
|
|
- 没有全盘访问时,受 TCC 保护的位置会被跳过,其余功能仍然可用。
|
|
|
|
|
|
- 存储分析与深度清理只在用户选择或配置目录后读取;文件内容不会上传。
|
|
|
|
|
|
- 除更新检查和安装包下载外,应用不发起网络请求。
|
2026-10-15 02:05:34 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
完整说明见 [`docs/DESKTOP.md`](docs/DESKTOP.md)。
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
## 快速开始
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
### 桌面端开发
|
2026-10-15 02:05:34 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
环境要求:
|
2026-10-15 02:05:34 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
- Node.js 20+ 与 pnpm
|
|
|
|
|
|
- Rust stable
|
|
|
|
|
|
- macOS:Xcode Command Line Tools
|
|
|
|
|
|
- Windows:MSVC Build Tools 与 WebView2 Runtime
|
2026-10-15 02:05:34 +00:00
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-11-05 06:05:21 +00:00
|
|
|
|
pnpm install
|
|
|
|
|
|
pnpm desktop:dev
|
2026-10-15 02:05:34 +00:00
|
|
|
|
```
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
仅运行 Vite 页面时无法调用 Tauri 命令;需要验证扫描、删除、系统数据或更新流程时请使用 `pnpm desktop:dev`。
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
### CLI / TUI
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-11-05 06:05:21 +00:00
|
|
|
|
cargo install --path crates/squid-cli
|
|
|
|
|
|
# 或
|
|
|
|
|
|
cargo build --release -p squid-cli
|
|
|
|
|
|
|
|
|
|
|
|
squid state # TUI
|
|
|
|
|
|
squid status # 系统快照
|
|
|
|
|
|
squid clean --dry-run # 预览可清理内容
|
|
|
|
|
|
squid uninstall --list # 已安装应用
|
|
|
|
|
|
squid purge ~/code # 深度清理项目构建产物
|
|
|
|
|
|
squid analyze ~/Library/Caches # 存储分析
|
|
|
|
|
|
squid history # 历史账本
|
2026-10-15 02:05:34 +00:00
|
|
|
|
squid undo # 还原最近一次废纸篓会话
|
2026-10-13 09:00:50 +00:00
|
|
|
|
```
|
|
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
常用命令:
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
| 命令 | 作用 |
|
2026-10-13 09:00:50 +00:00
|
|
|
|
| --- | --- |
|
2026-11-05 06:05:21 +00:00
|
|
|
|
| `clean` | 按规则清理缓存、日志、浏览器与开发者垃圾、崩溃报告和废纸篓 |
|
|
|
|
|
|
| `uninstall [NAME]` | 定位应用并生成“本体 + 残留”卸载计划 |
|
|
|
|
|
|
| `purge [PATHS…]` | 清理项目构建目录、磁盘镜像、安装包与陈旧下载 |
|
|
|
|
|
|
| `state` | 打开包含清理、卸载、深度清理、存储、系统和历史面板的 TUI |
|
|
|
|
|
|
| `status` | 输出 CPU、内存、网络、磁盘、电池与进程快照 |
|
|
|
|
|
|
| `analyze [PATH]` | 输出目录体积树与最大文件 |
|
|
|
|
|
|
| `history` / `undo [ID]` | 查看历史或还原废纸篓会话 |
|
|
|
|
|
|
| `whitelist add\|list\|remove` | 维护永不选中的保护路径 |
|
|
|
|
|
|
| `rules` | 列出当前生效的规则 |
|
|
|
|
|
|
| `doctor` | 检查权限、配置、历史文件和生效路径 |
|
|
|
|
|
|
|
|
|
|
|
|
所有删除命令都支持 `--dry-run`;非交互环境必须使用 `-y/--yes`。完整参数请运行 `squid <command> --help`。
|
|
|
|
|
|
|
|
|
|
|
|
## 架构
|
|
|
|
|
|
|
|
|
|
|
|
```text
|
|
|
|
|
|
crates/
|
|
|
|
|
|
├── squid-core 模型、路径、安全策略、设置、删除账本、进度与取消
|
|
|
|
|
|
├── squid-platform macOS / Linux / Windows 平台适配:应用、残留、卷、回收站、进程
|
|
|
|
|
|
├── squid-rules TOML 规则引擎:模式展开、锚点、保护、年龄与风险标记
|
|
|
|
|
|
├── squid-stats sysinfo 采样、趋势、电池、网络与磁盘活动
|
|
|
|
|
|
├── squid-engine clean / uninstall / purge / analyze 与唯一删除通道
|
|
|
|
|
|
├── squid-tui ratatui 终端界面
|
|
|
|
|
|
└── squid-cli clap 命令行入口
|
|
|
|
|
|
|
|
|
|
|
|
src/ React 桌面界面
|
|
|
|
|
|
src-tauri/ Tauri 壳、命令适配、托盘、权限检查与更新器
|
|
|
|
|
|
scripts/ 开发、验证与双平台发布脚本
|
|
|
|
|
|
docs/ 架构、设计、桌面与发布规范
|
|
|
|
|
|
```
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
核心依赖方向:
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
```text
|
|
|
|
|
|
squid-core → squid-platform → squid-rules → squid-stats → squid-engine → squid-tui → squid-cli
|
|
|
|
|
|
```
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
`src-tauri` 独立于根 Cargo workspace,但直接依赖 `squid-core`、`squid-platform`、`squid-stats` 与 `squid-engine`,桌面端不维护第二套清理实现。
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
更多设计见 [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md);Nex 系列统一颜色、字体和组件常量见 [`docs/DESIGN.md`](docs/DESIGN.md)。
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
## 安全模型
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
1. **索引式删除**:桌面界面只能提交扫描结果中的索引,不能提交任意待删除路径。
|
|
|
|
|
|
2. **执行前复验**:Rust 层重新构造扫描条目,并检查路径所有权、安全锚点、保护列表、白名单与锁定状态。
|
|
|
|
|
|
3. **默认进废纸篓**:删除模式默认是 `trash`;只有显式选择永久删除才直接移除。
|
|
|
|
|
|
4. **硬性禁区**:系统根目录、`/usr`、`/System`、`/Applications` 等位置不能被递归删除;符号链接不会被跟随。
|
|
|
|
|
|
5. **规则刹车**:规则支持 `protect`、`min_age_days`、`skip_if_running` 与 `risky` 标记。
|
|
|
|
|
|
6. **账本与撤销**:真实删除记录到本地 JSON 账本,仍在废纸篓中的文件可以还原。
|
|
|
|
|
|
7. **进程保护**:结束进程前重新采样并核对名称,拒绝 Squid 自身、系统首进程和关键系统进程。
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
GUI 和 CLI 使用同一个 `squid-engine::delete` 通道,因此行为、锁定和审计结果一致。
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
## 数据与配置
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
| 用途 | macOS | Windows |
|
|
|
|
|
|
| --- | --- | --- |
|
|
|
|
|
|
| 配置与规则 | `~/Library/Application Support/squid/` | `%APPDATA%\squid\` |
|
|
|
|
|
|
| 历史账本 | `~/Library/Application Support/squid/history/` | `%APPDATA%\squid\history\` |
|
|
|
|
|
|
| 删除去向 | `~/.Trash` 或永久删除 | 回收站或永久删除 |
|
2026-10-15 02:05:34 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
Linux 使用 XDG 目录。桌面端与 CLI/TUI 共用配置和历史,因此任一端产生的清理记录都能在另一端查看。
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
常用配置:
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
|
|
|
|
|
```toml
|
2026-11-05 06:05:21 +00:00
|
|
|
|
delete_mode = "trash"
|
|
|
|
|
|
history_keep = 60
|
|
|
|
|
|
purge_min_age_days = 7
|
|
|
|
|
|
purge_max_entries = 200000
|
|
|
|
|
|
show_allocated = true
|
|
|
|
|
|
language = "zh" # en | zh
|
2026-10-13 09:00:50 +00:00
|
|
|
|
whitelist = ["~/Library/Caches/ImportantApp"]
|
|
|
|
|
|
disabled_rules = ["user-trash"]
|
|
|
|
|
|
purge_roots = ["~/code", "~/Projects", "~/Desktop"]
|
|
|
|
|
|
```
|
|
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
主要环境变量:
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
|
|
|
|
|
| 变量 | 作用 |
|
|
|
|
|
|
| --- | --- |
|
2026-11-05 06:05:21 +00:00
|
|
|
|
| `SQUID_CONFIG_DIR` | 覆盖配置目录 |
|
|
|
|
|
|
| `SQUID_STATE_DIR` | 覆盖状态与历史目录 |
|
|
|
|
|
|
| `SQUID_LANG` | 强制 `zh` 或 `en` |
|
|
|
|
|
|
| `SQUID_UPDATE_URL` | 覆盖桌面端更新清单地址,适合测试发布通道 |
|
|
|
|
|
|
| `SQUID_TRUECOLOR` / `NO_COLOR` | 控制 TUI 颜色 |
|
|
|
|
|
|
| `SQUID_SYMBOL_CELLS` / `SQUID_CONSOLE_TRACE` | 排查 Windows 控制台字符宽度与排版 |
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
## 开发与验证
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
前端:
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
```bash
|
|
|
|
|
|
pnpm check
|
|
|
|
|
|
pnpm build
|
2026-10-13 09:00:50 +00:00
|
|
|
|
```
|
|
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
Rust workspace:
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
```bash
|
|
|
|
|
|
cargo fmt --all -- --check
|
|
|
|
|
|
cargo clippy --workspace --all-targets -- -D warnings
|
|
|
|
|
|
cargo test --workspace
|
2026-10-13 09:00:50 +00:00
|
|
|
|
```
|
|
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
Tauri:
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-11-05 06:05:21 +00:00
|
|
|
|
cargo fmt --manifest-path src-tauri/Cargo.toml -- --check
|
|
|
|
|
|
cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets -- -D warnings
|
|
|
|
|
|
cargo test --manifest-path src-tauri/Cargo.toml --lib
|
2026-10-13 09:00:50 +00:00
|
|
|
|
```
|
|
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
TUI 使用真实 pty 冒烟测试;Windows 控制台另有“抓帧、复放、量框”验证:
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
|
python3 -m pip install --user pyte
|
2026-11-05 06:05:21 +00:00
|
|
|
|
python3 scripts/tui_smoke.py
|
|
|
|
|
|
python3 scripts/tui-frame-check.py --selftest
|
2026-10-13 09:00:50 +00:00
|
|
|
|
```
|
|
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
CI 同时执行 workspace 测试、MSVC 目标交叉检查、桌面前端构建和 Tauri Rust 检查。
|
The README was the last file still describing the old project
Twenty-six commits went into main this week and not one of them touched
README.md, which sounds like restraint and is actually a bug: every commit made
the code more honest about Windows while the first file a stranger reads kept
saying the opposite. It opened with "macOS 磁盘清理与系统监控工具" as if the
platform layer shipped last month were a fork, and the crate map still described
squid-platform as "macOS 实现(App 清单、残留匹配、卷);Linux/Windows 占位" —
the same document that two sections later listed a working Windows registry
adapter, an IFileOperation recycle bin, thirty cleaning rules and a real machine
that had deleted files into it and restored them. A README that contradicts
itself is worse than a thin one, because the reader has to guess which half is
out of date, and the confident-looking half (the crate map, the feature table)
is exactly the half that is stale.
So this rewrites the stale claims and leaves the author's structure and tone
alone. squid-platform now says three implementations, and names what only
Windows has: the shell's recycle bin, console size and glyph-width probing,
process termination. The cleaning-rule count stops implying one number for every
platform — thirty-nine is macOS, thirty is windows.toml, and printing 39 above a
Windows install is a promise the rules directory does not keep. Uninstall says
where an app comes from on each platform, because "bundle id" means nothing to a
reader whose machine answers with a registry key, and the paths section now says
that on Windows config, rules and ledger all live under %APPDATA%\squid and that
the ledger records no physical path there — the Recycle Bin keeps the files, so
undo hands the restore to Explorer rather than renaming anything itself. Item 7
of the safety model got the same correction from the other direction, since it
used to promise "记录每条的废纸篓目标路径" unconditionally.
Two features the interface grew and the README never learned about. `x` joins
the key table: on the three file panels it is `d`, on the system panel it stops
the process under the cursor behind a dialog that repeats the sample rather than
the pid. That deserves a safety-model line as much as a key-table line, because
"the cleaner can also stop things" is the sentence a reader should meet next to
the list of processes it refuses to touch — squid itself, pid 0/1, Windows'
System Idle and pid 4, and csrss/smss/wininit/services/lsass/winlogon, an
elevated squid genuinely can open those for termination, which is the entire
reason for six names. svchost stays off the list on purpose, and the message now
says so rather than leaving the omission to be rediscovered as a bug report.
The Windows console paragraph records what the last two days of frame captures
taught: legacy conhost hands the process a window wider than the buffer behind
it, cp936 charges two cells for glyphs ratatui budgets one, and both lies arrive
as the same 花屏 — so the interface re-measures the size every beat and prices
each glyph before drawing it, and the command line deliberately buys the
pessimistic code-page answer instead of measuring, because measuring writes a
character onto whatever is on screen. SQUID_SYMBOL_CELLS and SQUID_CONSOLE_TRACE
join the environment table; they existed, they saved the port, they were
undocumented.
On the verification claim I did the opposite of what the week's momentum
suggested. The old line read "已在 Windows 10(1909)真机验证", and the machine at
192.168.2.92 was set up as a Windows 11 box, so the tempting edit was to write
"Windows 10 与 11 均已真机验证". Nothing in the repo supports that. Every
hardware check ever captured from that machine prints
`Windows 10 Pro (build 18363)`, and os_version reads ProductName,
DisplayVersion and CurrentBuildNumber straight out of the registry — there is no
code path by which a Windows 11 install produces 18363. Either the box is not
Windows 11 or its registry disagrees with whoever installed it; the README states
what the instrument reported and the roadmap carries "Windows 11 真机复验" as
pending, so the claim will be earned by a doctor run on a machine that says
22000 or newer, not asserted because it is plausible.
The remaining edits are smaller truths: release artifacts are Apple-only, so the
download section now says Windows builds from source rather than sending readers
after a nonexistent .tar.gz; the roadmap's Windows row picks up process
stopping, the highlight-that-survives-paging and the menu-that-stops-being-
overpainted fixes, and the "顶住 512 字节写入不变" settle condition that replaced
"seen twice" as the definition of a finished frame; "Linux/Windows 冒烟测试"
narrows to Linux, since Windows has a better instrument than a smoke test now —
capture on the real ConPTY, replay through pyte, measure the borders — and the
开发与测试 section shows how to run it, including --selftest, which is what keeps
the judge honest.
2026-10-16 04:56:48 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
## 打包与发布
|
The README was the last file still describing the old project
Twenty-six commits went into main this week and not one of them touched
README.md, which sounds like restraint and is actually a bug: every commit made
the code more honest about Windows while the first file a stranger reads kept
saying the opposite. It opened with "macOS 磁盘清理与系统监控工具" as if the
platform layer shipped last month were a fork, and the crate map still described
squid-platform as "macOS 实现(App 清单、残留匹配、卷);Linux/Windows 占位" —
the same document that two sections later listed a working Windows registry
adapter, an IFileOperation recycle bin, thirty cleaning rules and a real machine
that had deleted files into it and restored them. A README that contradicts
itself is worse than a thin one, because the reader has to guess which half is
out of date, and the confident-looking half (the crate map, the feature table)
is exactly the half that is stale.
So this rewrites the stale claims and leaves the author's structure and tone
alone. squid-platform now says three implementations, and names what only
Windows has: the shell's recycle bin, console size and glyph-width probing,
process termination. The cleaning-rule count stops implying one number for every
platform — thirty-nine is macOS, thirty is windows.toml, and printing 39 above a
Windows install is a promise the rules directory does not keep. Uninstall says
where an app comes from on each platform, because "bundle id" means nothing to a
reader whose machine answers with a registry key, and the paths section now says
that on Windows config, rules and ledger all live under %APPDATA%\squid and that
the ledger records no physical path there — the Recycle Bin keeps the files, so
undo hands the restore to Explorer rather than renaming anything itself. Item 7
of the safety model got the same correction from the other direction, since it
used to promise "记录每条的废纸篓目标路径" unconditionally.
Two features the interface grew and the README never learned about. `x` joins
the key table: on the three file panels it is `d`, on the system panel it stops
the process under the cursor behind a dialog that repeats the sample rather than
the pid. That deserves a safety-model line as much as a key-table line, because
"the cleaner can also stop things" is the sentence a reader should meet next to
the list of processes it refuses to touch — squid itself, pid 0/1, Windows'
System Idle and pid 4, and csrss/smss/wininit/services/lsass/winlogon, an
elevated squid genuinely can open those for termination, which is the entire
reason for six names. svchost stays off the list on purpose, and the message now
says so rather than leaving the omission to be rediscovered as a bug report.
The Windows console paragraph records what the last two days of frame captures
taught: legacy conhost hands the process a window wider than the buffer behind
it, cp936 charges two cells for glyphs ratatui budgets one, and both lies arrive
as the same 花屏 — so the interface re-measures the size every beat and prices
each glyph before drawing it, and the command line deliberately buys the
pessimistic code-page answer instead of measuring, because measuring writes a
character onto whatever is on screen. SQUID_SYMBOL_CELLS and SQUID_CONSOLE_TRACE
join the environment table; they existed, they saved the port, they were
undocumented.
On the verification claim I did the opposite of what the week's momentum
suggested. The old line read "已在 Windows 10(1909)真机验证", and the machine at
192.168.2.92 was set up as a Windows 11 box, so the tempting edit was to write
"Windows 10 与 11 均已真机验证". Nothing in the repo supports that. Every
hardware check ever captured from that machine prints
`Windows 10 Pro (build 18363)`, and os_version reads ProductName,
DisplayVersion and CurrentBuildNumber straight out of the registry — there is no
code path by which a Windows 11 install produces 18363. Either the box is not
Windows 11 or its registry disagrees with whoever installed it; the README states
what the instrument reported and the roadmap carries "Windows 11 真机复验" as
pending, so the claim will be earned by a doctor run on a machine that says
22000 or newer, not asserted because it is plausible.
The remaining edits are smaller truths: release artifacts are Apple-only, so the
download section now says Windows builds from source rather than sending readers
after a nonexistent .tar.gz; the roadmap's Windows row picks up process
stopping, the highlight-that-survives-paging and the menu-that-stops-being-
overpainted fixes, and the "顶住 512 字节写入不变" settle condition that replaced
"seen twice" as the definition of a finished frame; "Linux/Windows 冒烟测试"
narrows to Linux, since Windows has a better instrument than a smoke test now —
capture on the real ConPTY, replay through pyte, measure the borders — and the
开发与测试 section shows how to run it, including --selftest, which is what keeps
the judge honest.
2026-10-16 04:56:48 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
版本必须同时写入以下四处:
|
The README was the last file still describing the old project
Twenty-six commits went into main this week and not one of them touched
README.md, which sounds like restraint and is actually a bug: every commit made
the code more honest about Windows while the first file a stranger reads kept
saying the opposite. It opened with "macOS 磁盘清理与系统监控工具" as if the
platform layer shipped last month were a fork, and the crate map still described
squid-platform as "macOS 实现(App 清单、残留匹配、卷);Linux/Windows 占位" —
the same document that two sections later listed a working Windows registry
adapter, an IFileOperation recycle bin, thirty cleaning rules and a real machine
that had deleted files into it and restored them. A README that contradicts
itself is worse than a thin one, because the reader has to guess which half is
out of date, and the confident-looking half (the crate map, the feature table)
is exactly the half that is stale.
So this rewrites the stale claims and leaves the author's structure and tone
alone. squid-platform now says three implementations, and names what only
Windows has: the shell's recycle bin, console size and glyph-width probing,
process termination. The cleaning-rule count stops implying one number for every
platform — thirty-nine is macOS, thirty is windows.toml, and printing 39 above a
Windows install is a promise the rules directory does not keep. Uninstall says
where an app comes from on each platform, because "bundle id" means nothing to a
reader whose machine answers with a registry key, and the paths section now says
that on Windows config, rules and ledger all live under %APPDATA%\squid and that
the ledger records no physical path there — the Recycle Bin keeps the files, so
undo hands the restore to Explorer rather than renaming anything itself. Item 7
of the safety model got the same correction from the other direction, since it
used to promise "记录每条的废纸篓目标路径" unconditionally.
Two features the interface grew and the README never learned about. `x` joins
the key table: on the three file panels it is `d`, on the system panel it stops
the process under the cursor behind a dialog that repeats the sample rather than
the pid. That deserves a safety-model line as much as a key-table line, because
"the cleaner can also stop things" is the sentence a reader should meet next to
the list of processes it refuses to touch — squid itself, pid 0/1, Windows'
System Idle and pid 4, and csrss/smss/wininit/services/lsass/winlogon, an
elevated squid genuinely can open those for termination, which is the entire
reason for six names. svchost stays off the list on purpose, and the message now
says so rather than leaving the omission to be rediscovered as a bug report.
The Windows console paragraph records what the last two days of frame captures
taught: legacy conhost hands the process a window wider than the buffer behind
it, cp936 charges two cells for glyphs ratatui budgets one, and both lies arrive
as the same 花屏 — so the interface re-measures the size every beat and prices
each glyph before drawing it, and the command line deliberately buys the
pessimistic code-page answer instead of measuring, because measuring writes a
character onto whatever is on screen. SQUID_SYMBOL_CELLS and SQUID_CONSOLE_TRACE
join the environment table; they existed, they saved the port, they were
undocumented.
On the verification claim I did the opposite of what the week's momentum
suggested. The old line read "已在 Windows 10(1909)真机验证", and the machine at
192.168.2.92 was set up as a Windows 11 box, so the tempting edit was to write
"Windows 10 与 11 均已真机验证". Nothing in the repo supports that. Every
hardware check ever captured from that machine prints
`Windows 10 Pro (build 18363)`, and os_version reads ProductName,
DisplayVersion and CurrentBuildNumber straight out of the registry — there is no
code path by which a Windows 11 install produces 18363. Either the box is not
Windows 11 or its registry disagrees with whoever installed it; the README states
what the instrument reported and the roadmap carries "Windows 11 真机复验" as
pending, so the claim will be earned by a doctor run on a machine that says
22000 or newer, not asserted because it is plausible.
The remaining edits are smaller truths: release artifacts are Apple-only, so the
download section now says Windows builds from source rather than sending readers
after a nonexistent .tar.gz; the roadmap's Windows row picks up process
stopping, the highlight-that-survives-paging and the menu-that-stops-being-
overpainted fixes, and the "顶住 512 字节写入不变" settle condition that replaced
"seen twice" as the definition of a finished frame; "Linux/Windows 冒烟测试"
narrows to Linux, since Windows has a better instrument than a smoke test now —
capture on the real ConPTY, replay through pyte, measure the borders — and the
开发与测试 section shows how to run it, including --selftest, which is what keeps
the judge honest.
2026-10-16 04:56:48 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
- `Cargo.toml` workspace 版本
|
|
|
|
|
|
- `src-tauri/Cargo.toml`
|
|
|
|
|
|
- `src-tauri/tauri.conf.json`
|
|
|
|
|
|
- `package.json`
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
构建安装包:
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-10-15 02:05:34 +00:00
|
|
|
|
```bash
|
2026-11-05 06:05:21 +00:00
|
|
|
|
scripts/build-macos-release.sh
|
|
|
|
|
|
scripts/build-windows-release.sh
|
2026-10-15 02:05:34 +00:00
|
|
|
|
```
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
产物:
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
```text
|
|
|
|
|
|
artifacts/Squid-<version>-macOS-universal.dmg
|
|
|
|
|
|
artifacts/Squid-Setup-<version>-win-x64.exe
|
|
|
|
|
|
artifacts/SHA256SUMS.txt
|
|
|
|
|
|
```
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
发布到更新通道:
|
2026-10-13 09:00:50 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
```bash
|
|
|
|
|
|
scripts/publish-release.sh --notes /path/to/release-notes.md
|
|
|
|
|
|
```
|
2026-10-15 02:05:34 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
发布脚本会重建 `releases` 分支,写入 `squid-update.json`、两个安装包和可选的 `squid-update.sig`。清单包含精确大小与 SHA256,客户端下载后再次校验。
|
2026-10-15 02:05:34 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
完整发布流程、签名和清单格式见 [`docs/RELEASE.md`](docs/RELEASE.md)。
|
2026-10-15 02:05:34 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
## 平台状态
|
2026-10-15 02:05:34 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
| 平台 | 状态 |
|
|
|
|
|
|
| --- | --- |
|
|
|
|
|
|
| macOS | 桌面端与 CLI/TUI 完整支持,发布通用 DMG |
|
|
|
|
|
|
| Windows x64 | 桌面端与 CLI/TUI 支持,发布 NSIS 安装包 |
|
|
|
|
|
|
| Linux | 平台层与 CLI/TUI 基础实现;尚未提供内置 Linux 规则和桌面安装包 |
|
2026-10-15 02:05:34 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
## 许可证
|
2026-10-15 02:05:34 +00:00
|
|
|
|
|
2026-11-05 06:05:21 +00:00
|
|
|
|
Squid 使用 **GNU General Public License v3.0 only**(`GPL-3.0-only`)。完整条款见 [`LICENSE`](LICENSE)。
|