Commit Graph

15 Commits

Author SHA1 Message Date
therealaleph ca947d7755 releases: refresh in-repo archives to v0.9.2 2026-04-22 20:19:28 +03:00
therealaleph 9768cd9edb v0.9.2: update check tunnels through proxy + one-click asset download (#15 follow-up)
@zula-editor reported on issue #15 that the Check-for-updates button
was returning HTTP 403 on their ISP — classic GitHub
unauthenticated-API rate limit (60/hour per IP) on a shared NAT IP.
They also asked for the update to actually be downloadable from the
app, not just a page link.

Both addressed:

=== Route update check through our own proxy when running ===

New mhrv_rs::update_check::Route enum:
  - Direct: straight rustls to api.github.com (existing behavior)
  - Proxy { host, port }: HTTP CONNECT through our local HTTP proxy
    listener → MITM → Apps Script → api.github.com.

When the proxy is running, the UI automatically picks Proxy. From
GitHub's POV the request now comes from Apps Script's IP range (a
Google datacenter) — completely different rate-limit bucket from the
user's ISP IP, AND works even if GitHub is blocked on their network.

Routing over proxy means the MITM leaf for api.github.com has to be
trusted in the update_check's TLS config. build_root_store() now
conditionally adds our own CA cert from data_dir::ca_cert_path() to
the webpki roots when Route::Proxy is in use. Direct path is
unchanged.

=== Download button ===

The UpdateCheck::UpdateAvailable variant now carries an optional
ReleaseAsset { name, download_url, size_bytes } picked by
pick_asset_for_platform() from the GitHub API's assets[] array.
Preference list per (OS, arch):
  - macOS arm64 → mhrv-rs-macos-arm64-app.zip, else tar.gz
  - macOS amd64 → mhrv-rs-macos-amd64-app.zip, else tar.gz
  - Windows → mhrv-rs-windows-amd64.zip
  - Linux aarch64 → mhrv-rs-linux-arm64.tar.gz
  - Linux armv7 → mhrv-rs-raspbian-armhf.tar.gz
  - Linux x86_64 → mhrv-rs-linux-amd64.tar.gz

UI: when an update is available AND we have an asset, the transient
status line grows an accent-blue 'Download X.Y MB' button. Clicking
fires Cmd::DownloadUpdate, which pipes the asset through the same
Route (proxy if running, direct otherwise), writes it to
UserDirs::download_dir() (~/Downloads on most systems), and shows a
'show in folder' button that opens Finder / Explorer / xdg-open on
the containing directory.

Three new unit tests for asset-picking. The gated live test now
takes a Route argument (Direct) so it keeps working across the API
shape change. 49 tests pass.

Also refreshed in-repo releases/ archives to v0.9.1 alongside.
2026-04-22 20:11:35 +03:00
therealaleph 346daaad01 releases: refresh in-repo archives to v0.9.0 2026-04-22 19:47:51 +03:00
therealaleph 52d52b8239 releases: refresh in-repo archives to v0.8.6 (+ raspbian armhf) 2026-04-22 19:13:48 +03:00
therealaleph c2597cfa2b releases: refresh in-repo archives to v0.8.5 2026-04-22 18:38:27 +03:00
therealaleph d49c494b20 releases: refresh in-repo archives to v0.8.4 2026-04-22 17:27:34 +03:00
therealaleph 293e5714bb releases: refresh in-repo archives to v0.8.2 2026-04-22 16:07:20 +03:00
therealaleph 69838d19a0 releases: refresh in-repo archives to v0.8.1 2026-04-22 14:47:00 +03:00
therealaleph 9e58d187ad releases: refresh in-repo archives to v0.7.1
Verified: the linux-amd64 binary's highest GLIBC symbol is now 2.34
(was 2.39 in v0.7.0 and earlier), so it runs on Ubuntu 22.04 / Mint 21
/ Debian 12 and anything newer.
2026-04-22 11:18:22 +03:00
therealaleph 84503ecbe6 releases: refresh in-repo archives to v0.7.0 2026-04-22 03:32:42 +03:00
therealaleph 6999a1ef24 releases: refresh in-repo archives to v0.6.1 2026-04-22 03:03:52 +03:00
therealaleph 561cbadd96 releases: refresh in-repo archives to v0.5.1 (+ musl amd64/arm64) 2026-04-22 02:40:26 +03:00
therealaleph d51b84a430 releases: refresh in-repo archives to v0.5.0 2026-04-22 01:57:27 +03:00
therealaleph 68effd2477 releases: refresh in-repo archives to v0.4.4 2026-04-22 00:11:35 +03:00
therealaleph 54d317ae2c docs: add UI screenshot + releases/ folder with explainer
- docs/ui-screenshot.png: running UI with live traffic stats
- releases/README.md: documents the in-repo prebuilt binaries for users
  who cannot reach the GitHub Releases page (English + Persian)
- README: embed the screenshot in the 'What's in a release' section
2026-04-21 22:37:42 +03:00