diff --git a/.env.example b/.env.example index ad0cad027..2b6f18e22 100644 --- a/.env.example +++ b/.env.example @@ -120,9 +120,10 @@ PROXY_DETECTION_THRESHOLD=50 PROXY_DETECTION_WINDOW_SECONDS=3600 PROXY_DETECTION_RATIO_MIN=0.8 PROXY_DETECTION_MIN_SEARCHES=20 -# Only apps that fetch NZBs directly from the indexer (NZBHydra2/Prowlarr/Jackett). The *arr suite -# (Sonarr, Radarr, Lidarr, Readarr, Bazarr) only searches and never downloads from the indexer. -PROXY_DETECTION_INDEXER_REFERER_PATTERNS=hydra,prowlarr,jackett +# Only apps that fetch NZBs directly from the indexer (NZBHydra2/Prowlarr). The *arr suite (Sonarr, +# Radarr, Lidarr, Readarr, Bazarr) only searches, and Jackett is torrent-only (Torznab) so it never +# queries a Usenet/newznab indexer — none of them download NZBs from here. +PROXY_DETECTION_INDEXER_REFERER_PATTERNS=hydra,prowlarr APP_LOCALE=en APP_FALLBACK_LOCALE=en diff --git a/config/nntmux.php b/config/nntmux.php index 287d4165e..feb478f05 100644 --- a/config/nntmux.php +++ b/config/nntmux.php @@ -32,11 +32,12 @@ return [ 'proxy_detection_window_seconds' => (int) env('PROXY_DETECTION_WINDOW_SECONDS', 3600), 'proxy_detection_ratio_min' => (float) env('PROXY_DETECTION_RATIO_MIN', 0.8), 'proxy_detection_min_searches' => (int) env('PROXY_DETECTION_MIN_SEARCHES', 20), - // Only apps that fetch NZBs directly from the indexer belong here. NZBHydra2/Prowlarr (and Jackett, - // which proxies torrent/NZB downloads) issue their own download requests. The *arr suite (Sonarr, - // Radarr, Lidarr, Readarr, Bazarr) only search — directly or via Prowlarr/NZBHydra2 — and never - // download from the indexer, so listing them here would only risk false positives. - 'proxy_detection_indexer_referer_patterns' => env('PROXY_DETECTION_INDEXER_REFERER_PATTERNS', 'hydra,prowlarr,jackett'), + // Only apps that fetch NZBs directly from the indexer belong here. NZBHydra2 and Prowlarr issue their + // own download requests, so they can proxy an NZB fetch. The *arr suite (Sonarr, Radarr, Lidarr, + // Readarr, Bazarr) only search — directly or via Prowlarr/NZBHydra2 — and never download from the + // indexer, so listing them here would only risk false positives. Jackett is torrent-only (Torznab) + // and cannot query a newznab/Usenet indexer, so it never fetches NZBs here either. + 'proxy_detection_indexer_referer_patterns' => env('PROXY_DETECTION_INDEXER_REFERER_PATTERNS', 'hydra,prowlarr'), /* |-------------------------------------------------------------------------- diff --git a/tests/Unit/BlockAbusiveServicesTest.php b/tests/Unit/BlockAbusiveServicesTest.php index 66a4a4c91..9c0770341 100644 --- a/tests/Unit/BlockAbusiveServicesTest.php +++ b/tests/Unit/BlockAbusiveServicesTest.php @@ -307,7 +307,7 @@ class BlockAbusiveServicesTest extends TestCase config()->set('nntmux.proxy_detection_window_seconds', 3600); config()->set('nntmux.proxy_detection_ratio_min', 0.8); config()->set('nntmux.proxy_detection_min_searches', 20); - config()->set('nntmux.proxy_detection_indexer_referer_patterns', 'hydra,prowlarr,jackett'); + config()->set('nntmux.proxy_detection_indexer_referer_patterns', 'hydra,prowlarr'); $this->app->instance( CacheRepositoryContract::class, diff --git a/tests/Unit/IndexerProxyDetectorTest.php b/tests/Unit/IndexerProxyDetectorTest.php index f419a5068..19495d3bf 100644 --- a/tests/Unit/IndexerProxyDetectorTest.php +++ b/tests/Unit/IndexerProxyDetectorTest.php @@ -303,7 +303,7 @@ class IndexerProxyDetectorTest extends TestCase config()->set('nntmux.proxy_detection_min_searches', $overrides['min_searches'] ?? 20); config()->set( 'nntmux.proxy_detection_indexer_referer_patterns', - $overrides['referer_patterns'] ?? 'hydra,prowlarr,jackett', + $overrides['referer_patterns'] ?? 'hydra,prowlarr', ); }