Skip to content

feat: proxy Prowlarr Newznab/Torznab indexer feeds - #120

Open
Joly0 wants to merge 1 commit into
Notifiarr:developfrom
Joly0:feat/prowlarr-indexer-feeds
Open

Joly0 wants to merge 1 commit into
Notifiarr:developfrom
Joly0:feat/prowlarr-indexer-feeds

Conversation

@Joly0

@Joly0 Joly0 commented Oct 22, 2026

Copy link
Copy Markdown

I have been running this feature on my own instance since March and only now got around to filing it upstream. For this PR it was rebased onto current develop and partly reworked; the reworked version is what is tested below.

Problem

Prowlarr exposes every indexer as a Newznab/Torznab feed at /{id}/api and serves grabs at /{id}/download. Apps that search indexers directly through those feeds (Listenarr, for example) cannot go through starrproxy: nginx only routes .../api/..., so /{id}/api falls into the JSON 404 block.

Prowlarr also writes its own URL and API key into the download links of every feed result (http://prowlarr:9696/{id}/download?apikey=<prowlarr key>&link=...). Any consumer of the feed therefore receives Prowlarr's full API key, and downloads go straight to Prowlarr instead of through the proxy.

Fix

  • nginx: a location for /{id}/api and /{id}/download (also behind a base URL, the prefix is stripped like on the other routes) that passes endpoint=/{id}/api to api/index.php. The existing /api/ route is unchanged.
  • No bypass: both paths are in Prowlarr's openapi.json (/{id}/api, /{id}/download), so they go through the normal access check, logging, usage and blocked notifications. An app needs them granted like any other endpoint.
  • Feed responses: Prowlarr's URL is replaced with the proxy URL the client used, and Prowlarr's key with the caller's proxy key, so downloads come back through the proxy and Prowlarr's key never leaves it. Content-Length is dropped for the rewritten body.
  • Field redaction is skipped for non-JSON (XML) responses instead of iterating over a string.

3 files: root/etc/nginx/template.conf, api/index.php, functions/api.php.

Note: #111 (SignalR passthrough) also touches template.conf. This adds a separate location block, so the two should merge either way.

Testing

Built from this branch, real Prowlarr 2.6.5, proxied app granted /api/v1/indexer, /{id}/api, /{id}/download.

Request Result
/1/api?t=caps with the app's key 200 application/rss+xml, Prowlarr caps
/foo/1/api?t=caps (base URL) 200 application/rss+xml
/1/api?t=search&q=...&limit=1 200, <link> points at http://<proxy>/1/download?apikey=<proxy key>
/api/v1/indexer and /foo/api/v1/indexer 200 JSON
/api/v1/system/status (not granted) 401 missing access
/1/api with a key without the indexer grant 401 missing access to /1/api
/1/api without a key 401 no apikey provided
/foo/api 404 {"error":"Starr Proxy: Invalid starr route"}

Routes /{id}/api and /{id}/download (also behind a base URL) through the normal access checks, so apps like Listenarr can use Prowlarr indexers with a scoped key. Prowlarr writes its own URL and API key into the download links of feed results; those are rewritten to the proxy URL and the caller's key.
@austinwbest

Copy link
Copy Markdown
Member

Let me get that signalr one landed on develop and then we can loop back to this one as well

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.

2 participants