flaresolverr: support proxy auth. resolves #15099 (#15101)

This commit is contained in:
ilike2burnthing
2024-03-01 20:43:42 +00:00
committed by GitHub
parent a5a3b1168d
commit 1a900709e5
4 changed files with 7 additions and 3 deletions

View File

@@ -15,7 +15,7 @@
<PackageReference Include="Autofac" Version="6.5.0" />
<PackageReference Include="AutoMapper" Version="10.1.1" />
<PackageReference Include="BencodeNET" Version="4.0.0" />
<PackageReference Include="FlareSolverrSharp" Version="3.0.5" />
<PackageReference Include="FlareSolverrSharp" Version="3.0.6" />
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="DotNet4.SocksProxy" Version="1.4.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />

View File

@@ -94,7 +94,7 @@ namespace Jackett.Common.Models.Config
url = $"{authString}@{url}";
// add protocol
if (ProxyType == ProxyType.Socks4 || ProxyType == ProxyType.Socks5)
if (ProxyType == ProxyType.Socks4 || ProxyType == ProxyType.Socks5 || ProxyType == ProxyType.Http)
{
var protocol = (Enum.GetName(typeof(ProxyType), ProxyType) ?? "").ToLower();
if (!string.IsNullOrEmpty(protocol))

View File

@@ -84,6 +84,8 @@ namespace Jackett.Common.Utils.Clients
{
clearanceHandlr.MaxTimeout = serverConfig.FlareSolverrMaxTimeout;
clearanceHandlr.ProxyUrl = serverConfig.GetProxyUrl(false);
clearanceHandlr.ProxyUsername = serverConfig.ProxyUsername;
clearanceHandlr.ProxyPassword = serverConfig.ProxyPassword;
using (var clientHandlr = new HttpClientHandler
{
CookieContainer = cookies,

View File

@@ -60,7 +60,9 @@ namespace Jackett.Common.Utils.Clients
clearanceHandlr = new ClearanceHandler(serverConfig.FlareSolverrUrl)
{
MaxTimeout = serverConfig.FlareSolverrMaxTimeout,
ProxyUrl = serverConfig.GetProxyUrl(false)
ProxyUrl = serverConfig.GetProxyUrl(false),
ProxyUsername = serverConfig.ProxyUsername,
ProxyPassword = serverConfig.ProxyPassword
};
clientHandlr = new HttpClientHandler
{