Skip to content

fix: resolve beta blockers in downloads, RPC, NAT, and proxy - #2002

Merged
agalwood merged 9 commits into
mainfrom
fix/beta_blockers_1976_1988_1987_1997_20260828
Aug 28, 2026
Merged

fix: resolve beta blockers in downloads, RPC, NAT, and proxy#2002
agalwood merged 9 commits into
mainfrom
fix/beta_blockers_1976_1988_1987_1997_20260828

Conversation

@agalwood

@agalwood agalwood commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Summary

Resolve eight beta blockers affecting HTTP download naming and file display, aria2 RPC lifecycle, the downloads empty state, proxy-backed downloads and tracker sync, Windows NAT routing, and Windows torrent file associations.

This also updates Motrix to the published @motrix/nat@0.1.1 release from motrixapp/nat#1.

Issues

Key changes

  • Resolve HTTP filenames from the final request URI and response metadata after mux fallback and plugin hook rewrites.
    • Preserve an explicitly supplied filename.
    • Use bounded HEAD / ranged GET probes with redirect handling.
    • Honor request headers and explicit or global download proxy settings without leaking sensitive headers across origins.
    • Prefer Content-Disposition, then the redirected URL, and supplement missing extensions from Content-Type.
    • Sanitize untrusted remote filenames and retain safe URL-based fallbacks when probing fails.
  • Keep the HTTP/FTP Files tab on the logical final filename instead of exposing aria2's .motrix staging suffix.
    • Preserve the engine and database physical paths while a download is active.
    • Rebase persisted file rows after the final rename, including plugin-overridden destinations.
    • Preserve legitimate .motrix payload names and leave BT, Magnet, and Mux paths untouched.
  • Support an explicitly empty RPC secret as intentional no-token mode.
    • Missing or invalid persisted secrets still receive a generated secure default.
    • An explicit "" is preserved across saves and migrations.
    • No-token mode omits --rpc-secret and JSON-RPC token injection while keeping aria2 bound to loopback and disabling permissive cross-origin RPC access.
    • Refresh the RPC client credential before the first call to every newly started engine.
  • Coalesce concurrent engine restart requests into one stop/start cycle and disable repeated “Restart Now” actions while a restart is pending.
  • Restore the Glass Motion empty state when only removed task records remain by using the visible active-task count instead of the raw task mirror length.
  • Make SOCKS5 usable for aria2 HTTP(S)/FTP downloads and tracker-list refreshes through an authenticated loopback HTTP bridge.
    • Generate fresh in-memory credentials for each listener, bind only to 127.0.0.1 on an ephemeral port, serialize lifecycle changes, and revoke credentials before shutdown.
    • Redact the authenticated proxy URL from aria2 process logs.
    • Clarify that BT peer, DHT, and UDP tracker traffic remains direct; the proxy covers BT HTTP(S) traffic only.
  • Upgrade to @motrix/nat@0.1.1, which fixes Windows default-route selection in multi-adapter environments such as Tailscale and synchronizes the verified route before NAT mapping.
  • Restore the dedicated .torrent file icon for Windows installer associations without reverting the installer-owned Default Apps design.
    • Install torrent.ico to a stable resources path before registering the Torrent ProgID.
    • Keep the application, Magnet, and Motrix protocol icons on the main executable and preserve Windows UserChoice safety.
    • Keep normal and restricted-signing builds aligned, including the reviewed verifier digests.

Validation

  • Full Motrix test suite: 7,418 tests passed, 3 skipped.
  • Windows NSIS installer compilation with the dedicated torrent icon: passed.
  • TypeScript (tsc --noEmit): passed.
  • Biome checks across 1,617 files: passed.
  • Dependency-boundary and i18n checks: passed.
  • Flatpak generated-source and third-party declaration checks: passed.
  • @motrix/nat@0.1.1: 404 tests passed, 4 skipped; TypeScript, Biome, NAT lint, and package build passed.

@agalwood
agalwood marked this pull request as draft August 28, 2026 03:13
@agalwood agalwood changed the title fix: resolve beta blockers in downloads, RPC, and NAT fix: resolve beta blockers in downloads, RPC, NAT, and proxy Aug 28, 2026
@agalwood
agalwood marked this pull request as ready for review August 28, 2026 05:59
@agalwood
agalwood merged commit 90b4267 into main Aug 28, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment