Compare commits

...

7 Commits

Author SHA1 Message Date
Mark McDowall 9437ff9498 Add private IPv6 networks
(cherry picked from commit 52972e7efcce800560cbbaa64f5f76aaef6cbe77)
2025-11-10 09:26:45 +00:00
bakerboy448 e4fb36e08f Bump to 2.3.0 2025-10-30 05:51:48 -05:00
Mark McDowall ff22fdf7d3 Set known networks to RFC 1918 ranges during startup
(cherry picked from commit d10107739b9ed6a50165e5dd1dfae15c7e8aea56)
2025-10-29 23:42:00 +00:00
Polgonite b3d46465ae Fixed: qBittorrent /login API success check 2025-10-29 17:59:58 -05:00
bakerboy448 eb57d20545 Bump to 2.2.0 2025-10-25 14:42:07 -05:00
bakerboy448 775b716c0f Fixed:(RuTracker) fix for Anime S01nd Episode N of N or N+N of N+N
Based on Jackett 5b712189fc55470dc94b56ea0d764e123e2dc432
2025-10-20 18:19:42 -05:00
bakerboy448 f7f3648dac Bump to 2.1.5 2025-10-13 19:42:22 -05:00
4 changed files with 17 additions and 8 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ variables:
testsFolder: './_tests' testsFolder: './_tests'
yarnCacheFolder: $(Pipeline.Workspace)/.yarn yarnCacheFolder: $(Pipeline.Workspace)/.yarn
nugetCacheFolder: $(Pipeline.Workspace)/.nuget/packages nugetCacheFolder: $(Pipeline.Workspace)/.nuget/packages
majorVersion: '2.1.4' majorVersion: '2.3.0'
minorVersion: $[counter('minorVersion', 1)] minorVersion: $[counter('minorVersion', 1)]
prowlarrVersion: '$(majorVersion).$(minorVersion)' prowlarrVersion: '$(majorVersion).$(minorVersion)'
buildName: '$(Build.SourceBranchName).$(prowlarrVersion)' buildName: '$(Build.SourceBranchName).$(prowlarrVersion)'
@@ -424,8 +424,8 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
} }
catch (HttpException ex) catch (HttpException ex)
{ {
_logger.Debug("qbitTorrent authentication failed."); _logger.Debug(ex, "qbitTorrent authentication failed.");
if (ex.Response.StatusCode == HttpStatusCode.Forbidden) if (ex.Response.StatusCode is HttpStatusCode.Unauthorized or HttpStatusCode.Forbidden)
{ {
throw new DownloadClientAuthenticationException("Failed to authenticate with qBittorrent.", ex); throw new DownloadClientAuthenticationException("Failed to authenticate with qBittorrent.", ex);
} }
@@ -437,9 +437,9 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
throw new DownloadClientUnavailableException("Failed to connect to qBittorrent, please check your settings.", ex); throw new DownloadClientUnavailableException("Failed to connect to qBittorrent, please check your settings.", ex);
} }
if (response.Content != "Ok.") // returns "Fails." on bad login
if (response.Content.IsNotNullOrWhiteSpace() && response.Content != "Ok.")
{ {
// returns "Fails." on bad login
_logger.Debug("qbitTorrent authentication failed."); _logger.Debug("qbitTorrent authentication failed.");
throw new DownloadClientAuthenticationException("Failed to authenticate with qBittorrent."); throw new DownloadClientAuthenticationException("Failed to authenticate with qBittorrent.");
} }
@@ -1541,7 +1541,7 @@ namespace NzbDrone.Core.Indexers.Definitions
if (season != 0) if (season != 0)
{ {
searchString += " Сезон: " + season; searchString += " ТВ | Сезон: " + season;
} }
parameters.Set("nm", searchString); parameters.Set("nm", searchString);
@@ -1712,6 +1712,8 @@ namespace NzbDrone.Core.Indexers.Definitions
private readonly Regex _tvTitleRusSeasonRegex = new(@"Сезон\s*[:]*\s+(\d+(?:-\d+)?)", RegexOptions.Compiled | RegexOptions.IgnoreCase); private readonly Regex _tvTitleRusSeasonRegex = new(@"Сезон\s*[:]*\s+(\d+(?:-\d+)?)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
private readonly Regex _tvTitleRusEpisodeOfRegex = new(@"(?:Серии|Эпизод|Выпуски)+\s*[:]*\s+(\d+(?:-\d+)?)\s*из\s*([\w?])", RegexOptions.Compiled | RegexOptions.IgnoreCase); private readonly Regex _tvTitleRusEpisodeOfRegex = new(@"(?:Серии|Эпизод|Выпуски)+\s*[:]*\s+(\d+(?:-\d+)?)\s*из\s*([\w?])", RegexOptions.Compiled | RegexOptions.IgnoreCase);
private readonly Regex _tvTitleRusEpisodeRegex = new(@"(?:Серии|Эпизод|Выпуски)+\s*[:]*\s+(\d+(?:-\d+)?)", RegexOptions.Compiled | RegexOptions.IgnoreCase); private readonly Regex _tvTitleRusEpisodeRegex = new(@"(?:Серии|Эпизод|Выпуски)+\s*[:]*\s+(\d+(?:-\d+)?)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
private readonly Regex _tvTitleRusSeasonAnimeRegex = new(@"ТВ[-]*(?:(\d+))", RegexOptions.Compiled | RegexOptions.IgnoreCase);
private readonly Regex _tvTitleRusEpisodeAnimeOfRegex = new(@"\[(\d+(\+\d+)?)\s+из\s+(\d+(\+\d+)?)\]", RegexOptions.Compiled | RegexOptions.IgnoreCase);
public string Parse(string title, public string Parse(string title,
ICollection<IndexerCategory> categories, ICollection<IndexerCategory> categories,
@@ -1736,6 +1738,8 @@ namespace NzbDrone.Core.Indexers.Definitions
title = _tvTitleRusSeasonRegex.Replace(title, "S$1"); title = _tvTitleRusSeasonRegex.Replace(title, "S$1");
title = _tvTitleRusEpisodeOfRegex.Replace(title, "E$1 of $2"); title = _tvTitleRusEpisodeOfRegex.Replace(title, "E$1 of $2");
title = _tvTitleRusEpisodeRegex.Replace(title, "E$1"); title = _tvTitleRusEpisodeRegex.Replace(title, "E$1");
title = _tvTitleRusSeasonAnimeRegex.Replace(title, "S$1");
title = _tvTitleRusEpisodeAnimeOfRegex.Replace(title, "E$1 of $3");
} }
else if (IsAnyMovieCategory(categories)) else if (IsAnyMovieCategory(categories))
{ {
+7 -2
View File
@@ -1,6 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Net;
using DryIoc; using DryIoc;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
@@ -31,6 +32,7 @@ using Prowlarr.Http.ClientSchema;
using Prowlarr.Http.ErrorManagement; using Prowlarr.Http.ErrorManagement;
using Prowlarr.Http.Frontend; using Prowlarr.Http.Frontend;
using Prowlarr.Http.Middleware; using Prowlarr.Http.Middleware;
using IPNetwork = Microsoft.AspNetCore.HttpOverrides.IPNetwork;
using LogLevel = Microsoft.Extensions.Logging.LogLevel; using LogLevel = Microsoft.Extensions.Logging.LogLevel;
namespace NzbDrone.Host namespace NzbDrone.Host
@@ -59,8 +61,11 @@ namespace NzbDrone.Host
services.Configure<ForwardedHeadersOptions>(options => services.Configure<ForwardedHeadersOptions>(options =>
{ {
options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto | ForwardedHeaders.XForwardedHost; options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto | ForwardedHeaders.XForwardedHost;
options.KnownNetworks.Clear(); options.KnownNetworks.Add(new IPNetwork(IPAddress.Parse("10.0.0.0"), 8));
options.KnownProxies.Clear(); options.KnownNetworks.Add(new IPNetwork(IPAddress.Parse("172.16.0.0"), 12));
options.KnownNetworks.Add(new IPNetwork(IPAddress.Parse("192.168.0.0"), 16));
options.KnownNetworks.Add(new IPNetwork(IPAddress.Parse("fc00::"), 7));
options.KnownNetworks.Add(new IPNetwork(IPAddress.Parse("fe80::"), 10));
}); });
services.AddRouting(options => options.LowercaseUrls = true); services.AddRouting(options => options.LowercaseUrls = true);