core: FlareSolverr integration. Bypass Cloudflare protection (#9028)

This commit is contained in:
Diego Heras
2020-12-13 21:42:10 +01:00
committed by GitHub
parent d77b7c3616
commit ebe05267b2
11 changed files with 35 additions and 12 deletions

View File

@@ -8,7 +8,7 @@ using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
using CloudflareSolverRe;
using FlareSolverrSharp;
using Jackett.Common.Helpers;
using Jackett.Common.Models.Config;
using Jackett.Common.Services.Interfaces;
@@ -54,9 +54,10 @@ namespace Jackett.Common.Utils.Clients
public void CreateClient()
{
clearanceHandlr = new ClearanceHandler(BrowserUtil.ChromeUserAgent)
clearanceHandlr = new ClearanceHandler(serverConfig.FlareSolverrUrl)
{
MaxTries = 10
UserAgent = BrowserUtil.ChromeUserAgent,
MaxTimeout = 50000
};
clientHandlr = new HttpClientHandler
{