Skip to content

Add HIGHWAY support - #1039

Open
Yaknar wants to merge 2 commits into
rogerfar:mainfrom
Yaknar:main
Open

Yaknar wants to merge 2 commits into
rogerfar:mainfrom
Yaknar:main

Conversation

@Yaknar

@Yaknar Yaknar commented Sep 11, 2026

Copy link
Copy Markdown

Summary

Adds HIGHWAY (high-way.me) a Multi One Click Hoster that also downloads torrents and usenet
server-side, as a new debrid provider, alongside Real-Debrid,
AllDebrid, Premiumize, TorBox and DebridLink.

What's new

  • HighwayDebridClient: talks to HIGHWAY's transfers.php REST
    API (bearer token auth) for adding, listing, polling status and
    deleting torrent/usenet transfers. Modeled on TorBoxDebridClient,
    the only existing client that already handles both torrents and
    NZBs against a polled (non-instant) backend.
  • Two download modes:
    • Symlink + rclone WebDAV mount (recommended)
      files are resolved straight from the mount, nothing is downloaded twice.
    • Internal/Aria2c
      Each file is fetched via its own signed
      download_url (real Content-Length, respects the usual file
      filters), falling back to a whole-transfer ZIP only if HIGHWAY
      hasn't signed per-file URLs for that transfer.
  • Account info: username, premium status and plan expiry via
    HIGHWAY's ?stats=1, shown in the navbar like other providers.
  • Setup wizard, navbar and Settings page all pick up the new provider.

Fixes along the way

A few things surfaced while testing against a live HIGHWAY account
that affect every provider, not just this one:

  • Torrent detail page's status label (Real-Debrid Status) mapped
    the wrong text to each TorrentStatus value, stale since
    Queued=0 was added to the enum.
  • The navbar showed "Not premium" for a premium account with an
    unlimited/no-expiry plan (only dated expirations counted as
    "premium" before).
  • Downloads whose HTTP response has no Content-Length (streamed,
    chunked) got stuck showing 0% progress forever, even while actively
    downloading at full speed. Fallback to total Size of the Download.

Testing

  • dotnet test server/RdtClient.sln, all green, incl. a new
    HighwayDebridClientTest covering add/list/status/delete, HIGHWAY's
    state machine, symlink path resolution, and the per-file/ZIP
    fallback logic.
  • Manually verified end-to-end against the live cloud.high-way.me
    API and a real HIGHWAY account: adding a magnet and an NZB, polling
    to completion, per-file downloads with real Content-Length, and
    the rclone-mount symlink path.

Docs

  • README.md gets a HIGHWAY section (settings, the two download
    modes, an rclone.conf snippet).

Add high-way.me as a debrid provider (Provider.HIGHWAY), modeled on
TorBoxDebridClient since it's the only existing client that already
handles both torrents and NZBs against a polled, non-instant backend.

Server integration (HighwayDebridClient, transfers.php):
- add/list/status/delete via bearer token (API key setting)
- 32-hex spool-reference -> numeric transfer id promotion once HIGHWAY
  starts a queued transfer, mirrored in Torrents' reconcile loop
- state mapping (queued/downloading/completed/error -> TorrentStatus)
- account info via ?stats=1 (username, premium, plan expiry)
- pre-add cache check via ?check= for GetAvailableFiles()

Two download modes:
- Symlink: resolves files straight from an rclone WebDAV mount
  (content_path + files[].path), no HTTP transfer
- Internal/Aria2c: downloads each file via its own signed
  files[].download_url (respects include/exclude/min-size filters, no
  unzip step); falls back to the whole-transfer ZIP only when
  per-file signed URLs aren't available server-side

Fixes found while testing against the live server:
- DownloadClient: fall back to the provider's reported size when a
  download's Content-Length is unknown (HIGHWAY's on-the-fly ZIP
  streams without one, so progress got stuck at 0%)
- DebridClientUser/Profile: add a Premium flag so accounts with an
  unlimited/no-expiry plan don't show "Not premium" in the navbar
- torrent.component.html: fix the status label switch, which used
  stale numeric literals from before TorrentStatus.Queued=0 was added
  and was off by one for every provider, not just HIGHWAY

UI: HIGHWAY option + help text in the setup wizard and navbar
provider link; the Settings page picks up the new provider and its
API-key field automatically via the existing enum/reflection UI.

Docs: README HIGHWAY section incl. rclone.conf snippet.
HIGHWAY_PROVIDER_SPEC.md documents the transfers.php API this is
built against.

Tests: new HighwayDebridClientTest (add/list/status/delete, state
mapping, symlink path resolution, per-file vs ZIP fallback, error
handling); existing Torrents(...) call sites updated for the new
ctor parameter.
Remove outdated info
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.

1 participant