Skip to content

fix(tauri): 加速自动更新下载#138

Merged
appergb merged 1 commit into
Open-Less:mainfrom
Cooper-X-Oak:codex/auto-update-download-acceleration
May 2, 2026
Merged

fix(tauri): 加速自动更新下载#138
appergb merged 1 commit into
Open-Less:mainfrom
Cooper-X-Oak:codex/auto-update-download-acceleration

Conversation

@Cooper-X-Oak
Copy link
Copy Markdown
Contributor

@Cooper-X-Oak Cooper-X-Oak commented May 1, 2026

摘要

Fixes #137

这个 PR 解决的单一目标是:把自动更新主下载路径从 GitHub Releases 直连改成 fastgit.cc 优先,GitHub 原站只保留 fallback,并去掉应用层手动探测本地代理端口的逻辑。

修复 / 新增 / 改进

  • AutoUpdate.tsx:删除本地代理端口探测,只保留正常的 updater check({ timeout })
  • tauri.conf.json:配置 fastgit.cc mirror endpoint 在前,GitHub Releases endpoint 在后。
  • write-updater-manifest.mjs / release workflow:生成 mirror manifest,并让 mirror installer URL 使用 fastgit.cc 前缀。
  • docs/auto-update-download-acceleration.md:改成“原来怎样、现在怎样、验证结果”的说明方式。

兼容

  • 不包含:签名密钥、版本号、installer 格式、安装执行逻辑变更。
  • 对现有用户 / 本地环境 / 构建流程的影响:更新包签名校验不变;mirror 只改变下载路径;CI 会额外产出 latest-<target>-<arch>-mirror.json,原标准 manifest 仍保留。

测试计划

  • 命令:./scripts/windows-preflight.ps1 -Toolchain msvc(在 MSVC / VsDevCmd 环境下)
  • 结果:Preflight passed。
  • 证据路径:本地按 CI 同款 Windows MSVC 环境验证通过。
  • 命令:PowerShell 脚本语法检查(windows-preflight.ps1windows-build-gnu.ps1windows-runtime-smoke.ps1
  • 结果:语法检查通过。
  • 证据路径:本地按 .github/workflows/ci.yml 同款检查验证通过。
  • 命令:npm run build
  • 结果:TypeScript + Vite production build 通过。
  • 证据路径:本地构建结果已验证。
  • 命令:cargo check --manifest-path src-tauri/Cargo.toml(在 MSVC / VsDevCmd 环境下)
  • 结果:检查通过,仅有仓库现有 warnings,无本次改动新增构建错误。
  • 证据路径:本地按 CI 同款 Windows MSVC 环境验证通过。
  • 命令:dummy updater artifact 执行 scripts/write-updater-manifest.mjs
  • 结果:生成 GitHub 原站 manifest 与 fastgit.cc mirror manifest。
  • 证据路径:本地脚本执行结果已验证。

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @Cooper-X-Oak, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@Cooper-X-Oak Cooper-X-Oak force-pushed the codex/auto-update-download-acceleration branch 2 times, most recently from 175a0ce to 45f958f Compare May 1, 2026 15:25
@Cooper-X-Oak
Copy link
Copy Markdown
Contributor Author

Update after mirror review: switched the default mirror from gh.llkk.cc to fastgit.cc because fastgit explicitly documents support for GitHub release/archive acceleration.

Fresh no-proxy Windows measurement with curl --noproxy '*':

fastgit.cc manifest: 1.81s
fastgit.cc installer run 1: 24.09s for 4.78 MB
fastgit.cc installer run 2: 23.42s for 4.78 MB

This remains much better than direct GitHub in the same environment, where the 4.78 MB installer timed out twice after 90s with partial downloads. The mirror is still configurable via OPENLESS_UPDATE_MIRROR_BASE_URL; we should re-test before release if update delivery is a release blocker.

@Cooper-X-Oak Cooper-X-Oak changed the title Speed up updater downloads fix(tauri): 加速自动更新下载 May 1, 2026
@Cooper-X-Oak Cooper-X-Oak force-pushed the codex/auto-update-download-acceleration branch from 45f958f to 27b54db Compare May 1, 2026 15:46
@Cooper-X-Oak Cooper-X-Oak force-pushed the codex/auto-update-download-acceleration branch from 27b54db to e34b3fe Compare May 1, 2026 15:48
@Cooper-X-Oak Cooper-X-Oak marked this pull request as ready for review May 1, 2026 15:57
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @Cooper-X-Oak, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@appergb appergb merged commit 68298d2 into Open-Less:main May 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[tauri] 自动更新下载过慢且代理未生效

2 participants