You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Direct downloads are served by the API server instead of delegating to a proxy node #326
srv01-proxy.domain.com/api/v1/direct-download?file_id=12345&token=abcdefg or something
Reply digest
When downloading an item, the central API server streams the file bytes itself (s.domain.com/api/v1/direct-download?...) rather than handing the download off to a configured proxy node (srv01-proxy.domain.com/...). Playback already delegates to proxy nodes; downloads never do, so the API server carries all download egress.
Code references
Verified present on origin/main as of 2026-07-07 (no download/proxy-node commits in the gap). Reads as an enhancement/feature-gap rather than a regression: playback delegates via PlanSession -> resp.StreamURL rewrite, but the download handler has no NodePlanner at all. Fix mirrors playback: give the download handler a NodePlanner/ProxyPool and 302-redirect to proxyNode.URL when healthy proxy nodes exist.
internal/api/handlers/downloads.go:45: DownloadHandler struct lacks a NodePlanner/proxy-pool dependency (unlike PlaybackHandler), so the download route can never delegate to a node
internal/api/handlers/downloads.go:424 (HandleDirectDownload): unconditionally streams via svc.ServeDirect; never issues a redirect/URL-rewrite to a proxy node
internal/downloads/service.go:849 (ServeDirect -> serveLocalFile -> http.ServeContent): always serves bytes locally; no nodepool import, no proxy-URL generation
Activity