Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WiP: Fix looping Cloudflare challenge, Resolves #1036 #1163

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ilike2burnthing
Copy link
Contributor

Thanks to @juanfrilla for #1036 (comment).

Unfortunately, currently this only works on Windows, and the looping challenges return if using proxies or VPNs.

@garfield69
Copy link
Contributor

garfield69 commented Apr 21, 2024

FWIW
My win10 is on chrome 124, and i don't use VPN or proxy.
I've tested this PR (as a source based python run), and it solves for trupornolabs, riperam, marinetracker, devil-torrents, 52BT, which were indexers that were giving me issues previoulsy.
Also tested against most of the other cloudflare protected indexers that were previously working for me, and they continue to work with this PR.
Some indexers however continue to fail, leporno still returns the invalid cookies error, and ext-torrents which now fails on ext.to but works for the other 2 alternate domains.

But after each solve there remains a chrome subtask that starts to spin up to 15% CPU and I have to manually kill them off.
Should I test using this PR win10 exe?
[edit] Oh wait, there isn't one.

@juanfrilla
Copy link

juanfrilla commented Apr 21, 2024

Another thing that I've noticed is that in the user-agent headless replacement:

                self.execute_cdp_cmd(
                    "Network.setUserAgentOverride",
                    {
                        "userAgent": self.execute_script(
                            "return navigator.userAgent"
                        ).replace("Headless", "")
                    },
                )

I don't know why but If I hardcode the user-agent using the exact that my computer has like this:

user_agent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
options.add_argument(f"--user-agent={user_agent}")

it bypasses cloudflare, but if i put this to make it automatically like you have it on line 533 from src/undetected_chromedriver/__init__.py it does not work.

So an alternative could be to setup a driver only to get the user agent:

def get_user_agent(driver):
   return driver.execute_script("return navigator.userAgent;").replace("Headless", "")

And then pass the user-agent to the definitive driver

PD: I only can tell you what I've discovered to see if we can go through the solution cuz I'm having troubles to get the project installed/set up 😅

@m33ts4k0z
Copy link

m33ts4k0z commented Apr 21, 2024

Hello. I just wanted to let you know that this didnt bypass the challenge on arab-torrents.net, showing the same internal server error. I am not using VPN, proxies and I dont have a datacenter IP. Let me know if you need any info to troubleshoot this further.

I didnt actually use this branch, it worked fine after I switched to it. Thanks

@ilike2burnthing
Copy link
Contributor Author

ilike2burnthing commented Apr 21, 2024

@garfield69 yea this seems to be an issue with Chrome v124. You can revert to v123 in the mean time if it's easier - #1161

Alternatively, build your own binaries, which will use Chromium v123:

python src/build_package.py

@ilike2burnthing
Copy link
Contributor Author

@m33ts4k0z were you doing this on Windows?

@m33ts4k0z
Copy link

@m33ts4k0z were you doing this on Windows?

Yes on a Windows 11 VM on Unraid but it did work in the end. I updated my first post here with the cause.

@garfield69
Copy link
Contributor

Alternatively, build your own binaries, which will use Chromium v123:

python src/build_package.py

Oh cool, did not know I could build on windows.
Built successfully and tested. Much better, no left over chrome tasks chewing CPU anymore :-)

@ilike2burnthing
Copy link
Contributor Author

ilike2burnthing commented Apr 22, 2024

@juanfrilla sorry for the delay in replying, been busy and only got to a few quick ones on my phone.

I'll have a look at the UA idea when I next get a chance, thanks.

Assuming you're following the run from source instructions, what issue are you having? https://github.com/FlareSolverr/FlareSolverr#from-source-code

@juanfrilla
Copy link

@ilike2burnthing my main problem is that i cannot install Xvfb on MacOS

@ilike2burnthing
Copy link
Contributor Author

Tried XQuartz?

@juanfrilla
Copy link

juanfrilla commented Apr 22, 2024

Tried XQuartz?

yessir now the project is set up, let's see what I can fix

@21hsmw
Copy link
Contributor

21hsmw commented May 1, 2024

What exactly is left to do on this to get it merge? I tried to guess with the comments here and some different issues but I can't get the current status of this. It seems to be stale for quite some time, so what's needed?

@ilike2burnthing
Copy link
Contributor Author

Unfortunately, currently this only works on Windows, and the looping challenges return if using proxies or VPNs.

I'll have a look at the UA idea when I next get a chance, thanks.

@21hsmw
Copy link
Contributor

21hsmw commented May 1, 2024

Unfortunately, currently this only works on Windows, and the looping challenges return if using proxies or VPNs.

I'll have a look at the UA idea when I next get a chance, thanks.

Well, I made my own implementation of this "new tab" idea and I was able to make it work with every website I could (ext.to, www3.yggtorrent.cool, dodi-repacks.site, hd-torrents.me/login.php, nhentai.net) on my Linux system using a VPN / socks5 proxy and also with my container image on my own remote Linux server, which was blocked by cloudflare too.
Unfortunately I can't test on Windows, so if someone can test that and report back please do.

Public image with my edits: 21hsmw/flaresolverr:fixlooping
Code here: 21hsmw@da6cc9d

@ilike2burnthing
Copy link
Contributor Author

That's working 95% of the time on Windows for me, even with a proxy, but failing 95% of the time on Docker. Usual error:

Error: Error solving the challenge. 'NoneType' object has no attribute 'startswith'

Seems it's related to get_correct_window and trying to get driver.current_url. Adding some extra logging shows that the URL is returned as None. Adding some additional sleeps then shows the correct URL, but I'm still getting challenge loops or crashed.

@21hsmw
Copy link
Contributor

21hsmw commented May 2, 2024

That's working 95% of the time on Windows for me, even with a proxy, but failing 95% of the time on Docker.

When you say it fails on Docker, is it still on Windows or Linux?

I got this error on Linux while doing my implementation, but have not been able to replicate it since. For the looping challenges, it seems to be a timing issue. Playing with the timer values can make it work in some cases, but it's not easy to know what works for everyone since it seems to take network latency into account. For example, if I use a proxy close to my location, it works 100% of the time with the sites I listed earlier, but if I use a proxy very far from me, it works 50% of the time.
Can you try to increase the timers to something like 6, 8 or more?

@ilike2burnthing
Copy link
Contributor Author

Linux.

I'll play around with timings again (I did a bunch yesterday), see if I can get something that works both on my Docker and Windows.

@21hsmw
Copy link
Contributor

21hsmw commented May 2, 2024

Linux.

Strange then. I'm able to solve the challenges of all sites I try on my Debian and Fedora systems with different VPNs/Proxies with and without Docker involved.
Can you share an example of one of your tests with debug enabled?

Here's an example with dodi-repacks.site using the docker image I shared previously:
https://pastebin.com/nBramRXq

@aevrard

This comment was marked as off-topic.

@zenderzender
Copy link

Unfortunately, currently this only works on Windows, and the looping challenges return if using proxies or VPNs.

I'll have a look at the UA idea when I next get a chance, thanks.

Well, I made my own implementation of this "new tab" idea and I was able to make it work with every website I could (ext.to, www3.yggtorrent.cool, dodi-repacks.site, hd-torrents.me/login.php, nhentai.net) on my Linux system using a VPN / socks5 proxy and also with my container image on my own remote Linux server, which was blocked by cloudflare too. Unfortunately I can't test on Windows, so if someone can test that and report back please do.

Public image with my edits: 21hsmw/flaresolverr:fixlooping Code here: 21hsmw@da6cc9d

Thanks for your workaround @21hsmw
Here is a temporary image for anybody needing arm build :)
zender/flaresolverr-fixed:arm

Working with LANG=fr-FR

@aevrard the solution you provide will kill the killswitch if you're using something like gluetun...

@LoicBrison
Copy link

Thanks @21hsmw !
Works for YGG with YGGCookie and YGGtorrent; LANG=en_US

@Vrozaksen
Copy link

Vrozaksen commented May 3, 2024

21hsmw/flaresolverr:fixlooping

Worked for me on whatbox.ca

services:
     flaresolverr:
         image: 21hsmw/flaresolverr:fixlooping
         environment:
           - LOG_LEVEL=${LOG_LEVEL:-info}
           - LOG_HTML=${LOG_HTML:-false}
           - CAPTCHA_SOLVER=${CAPTCHA_SOLVER:-none}
           - TZ=UTC
           - PORT=25000
           - HOST=127.0.0.1
         network_mode: host
         pull_policy: always
         restart: unless-stopped

@juanfrilla
Copy link

juanfrilla commented May 3, 2024

Unfortunately, currently this only works on Windows, and the looping challenges return if using proxies or VPNs.

I'll have a look at the UA idea when I next get a chance, thanks.

Well, I made my own implementation of this "new tab" idea and I was able to make it work with every website I could (ext.to, www3.yggtorrent.cool, dodi-repacks.site, hd-torrents.me/login.php, nhentai.net) on my Linux system using a VPN / socks5 proxy and also with my container image on my own remote Linux server, which was blocked by cloudflare too. Unfortunately I can't test on Windows, so if someone can test that and report back please do.

Public image with my edits: 21hsmw/flaresolverr:fixlooping Code here: 21hsmw@da6cc9d

replacing the image of the dockerfile for this:
python:3.11-slim-bullseye works perfectly locally on MacOS M2 with and without proxies (tested for my website "https://www.icj-cij.org/sites/default/files/case-related/187/187-20231215-ord-01-00-en.pdf", I can get the cf_clearance cookie

I tested as well on a centOS server with the previous image (python:3.11-slim-bookworm) and it doesnt work

@21hsmw
Copy link
Contributor

21hsmw commented May 28, 2024

@ilike2burnthing I spent some time the last few days implementing the request.get part of flaresolverr with nodriver. It works on Linux and Windows based on my own testing, including headless for Windows.
If you have some time, can you build and test my nodriver-support branch? There's still some work to be done, but it should work as is and I'm curious to see if you can pass cf challenges with it.

@ilike2burnthing
Copy link
Contributor Author

Looks good, I'll test this when I get some free time. Can you also push a Docker build of this so I can test it more easily as well? Thanks!

@21hsmw
Copy link
Contributor

21hsmw commented May 29, 2024

Can you also push a Docker build of this so I can test it more easily as well? Thanks!

Sure, it's available here on docker hub: 21hsmw/flaresolverr:nodriver
Use DRIVER=nodriver to enable it.
Let me know about your results.

@Larryadd
Copy link

Larryadd commented Jun 3, 2024

I don't know if this can help but YGG is cloudflared since yesterday (june 2 2024).
Last version of FlareSolverr wasn't working I tried differents configs with no luck. (I actually read all comments)
I tried 21hsmw build and it worked 1st time without changing anything in the config.
Cannot explain why but just wanted to share the info.
I use this message to thank you all for your investment on this project.
Have a good day.
Edit : Docker/debian12.

@juanfrilla
Copy link

juanfrilla commented Jun 3, 2024

i'm not able to get it working with this url (i dont know what happened):
"https://www.icj-cij.org/sites/default/files/case-related/187/187-20231215-ord-01-00-en.pdf"

@21hsmw
Copy link
Contributor

21hsmw commented Jun 3, 2024

i'm not able to get it working with this url (i dont know what happened): "https://www.icj-cij.org/sites/default/files/case-related/187/187-20231215-ord-01-00-en.pdf"

Can you tell which image you used to get this result?

I tried the current latest tag which got stuck in a loop, then I tried 21hsmw/flaresolverr:fixlooping and 21hsmw/flaresolverr:nodriver (with uc and nodriver) and they both pass the challenge.

@juanfrilla
Copy link

juanfrilla commented Jun 4, 2024

I'm doing it with 21hsmw/flaresolverr:nodriver cuz I cannot execute this 21hsmw/flaresolverr:fixloopingwith macos.
Sometimes it works and sometimes dont, I notice when I combine with scrapy it doesnt work and when I execute in a separate script it works.
For working I mean to be able to get the cookies from the flaresolverr and send them to requests library in order to get the response.content

i'm not able to get it working with this url (i dont know what happened): "https://www.icj-cij.org/sites/default/files/case-related/187/187-20231215-ord-01-00-en.pdf"

Can you tell which image you used to get this result?

I tried the current latest tag which got stuck in a loop, then I tried 21hsmw/flaresolverr:fixlooping and 21hsmw/flaresolverr:nodriver (with uc and nodriver) and they both pass the challenge.

@21hsmw
Copy link
Contributor

21hsmw commented Jun 5, 2024

For working I mean to be able to get the cookies from the flaresolverr and send them to requests library in order to get the response.content

When flaresolverr fails to return cookies, what error exactly is being reported?
Since you said it works with an external script and not scrapy, I'm not sure if it works all the time and the external tool fails, or if it's flaresolverr itself that fails to solve the challenge.

@Hyperz
Copy link

Hyperz commented Jun 5, 2024

@21hsmw I've been testing your nodriver version on Windows 10. It works, but there are two issues I've found with it. First, for some reason it seems to leave behind zombie Chrome processes that peg one core at 100% each. Not sure if this is a nodriver bug or something related to how FlareSolverr handles the lifespan of driver/tab instances. Second issue is that whenever it creates a driver instance to solve a challenge it steals focus from other windows which is incredibly annoying when trying to use it locally while doing other work. TBF this was an issue with chromedirver too, but there it could be solved by passing a --headless argument in the options instead of relying on startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW to fake headless mode. This no longer works b/c using the headless flag gets it detected. But I was thinking do we really need to completely destroy the driver instance after every use? If there was an option to force it to reuse an existing driver instance it would resolve the focus stealing problem on Windows I think, and it would also be a good option to have for running FlareSolver on systems that have more RAM than CPU resources available since (re)starting Chrome for every single challenge is a really expensive operation 🤷‍♂️.

@21hsmw
Copy link
Contributor

21hsmw commented Jun 5, 2024

First, for some reason it seems to leave behind zombie Chrome processes that peg one core at 100% each. Not sure if this is a nodriver bug or something related to how FlareSolverr handles the lifespan of driver/tab instances.

Yes, I am aware of this problem. I experienced it when I tested it with Windows, and I found out in the nodriver documentation that the parent process could stay running in the background. I did some testing, including testing an internal nodriver function that is not part of the official documentation, and it did not kill it. It's actually on my list of things to fix before doing a PR. I'll see what I can do.

Second issue is that whenever it creates a driver instance to solve a challenge it steals focus from other windows which is incredibly annoying when trying to use it locally while doing other work. TBF this was an issue with chromedirver too, but there it could be solved by passing a --headless argument in the options instead of relying on startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW to fake headless mode. This no longer works b/c using the headless flag gets it detected.

For the nodriver addition, I decided to keep the original headless implementation for Windows. Since it doesn't use a driver here, maybe the headless option built into nodriver could work, to be honest I haven't tested it, so I'll try that later.

But I was thinking do we really need to completely destroy the driver instance after every use? If there was an option to force it to reuse an existing driver instance it would resolve the focus stealing problem on Windows I think, and it would also be a good option to have for running FlareSolver on systems that have more RAM than CPU resources available since (re)starting Chrome for every single challenge is a really expensive operation 🤷‍♂️.

That's what sessions are for, but it's not available in nodriver yet. This is something I need to add, and it will probably be added before the end of the week.

@ilike2burnthing
Copy link
Contributor Author

Apologies, still yet to get the time to look at this. There are a few open issues about memory leaks with nodriver, might be worth looking at:

We've also dealt with zombie processes in the past, most recently in #1193, but might be worth looking at 7d84f1b and 9b2c602 in case there's anything useful and equivalent that could be done.

@Hyperz
Copy link

Hyperz commented Jun 5, 2024

Yes, I am aware of this problem. I experienced it when I tested it with Windows, and I found out in the nodriver documentation that the parent process could stay running in the background. I did some testing, including testing an internal nodriver function that is not part of the official documentation, and it did not kill it. It's actually on my list of things to fix before doing a PR. I'll see what I can do.

I'm using this rather ugly workaround for it at the moment using psutil. I call the function after every driver.stop() call. It only kills nodriver Chrome instances and I'm not seeing any negative side effects in doing so:

def kill_chrome_processes(delay: float = 5.0) -> None:
    if delay > 0:
        time.sleep(delay)

    for proc in psutil.process_iter(['pid', 'name', 'cmdline']):
        if proc.info['name'] in ('chrome', 'chrome.exe'):
            if (
                any(c.startswith('--no-zygote') for c in proc.info['cmdline'])
                and any(c.startswith('--user-agent') for c in proc.info['cmdline'])
            ):
                psutil.Process(proc.info['pid']).kill()

For the nodriver addition, I decided to keep the original headless implementation for Windows. Since it doesn't use a driver here, maybe the headless option built into nodriver could work, to be honest I haven't tested it, so I'll try that later.

But it is using the headless option built into nodriver (options.windows_headless = True) no? This is "fake headless" though and works by spawning a chrome process with an invisible window. But since it still creates a window it steals focus, unlike real headless mode by using options.add_argument('--headless'). But nodriver throws an exception when you try to do that. And commenting out the code that checks for the --headless argument just causes timeouts again when trying to solve challenges. Though I didn't investigate further.

That's what sessions are for, but it's not available in nodriver yet. This is something I need to add, and it will probably be added before the end of the week.

Oh, right. For some reason I thought that was something related to cookies. Still, wouldn't it make sense for the default behavior to be reusing driver instances unless explicitly choosing to manage sessions?

@21hsmw
Copy link
Contributor

21hsmw commented Jun 5, 2024

But it is using the headless option built into nodriver (options.windows_headless = True) no? This is "fake headless" though and works by spawning a chrome process with an invisible window. But since it still creates a window it steals focus, unlike real headless mode by using options.add_argument('--headless'). But nodriver throws an exception when you try to do that. And commenting out the code that checks for the --headless argument just causes timeouts again when trying to solve challenges. Though I didn't investigate further.

options.windows_headless is not included in nodriver by default, I added it manually to the source. Only options.headless is included natively. If you want to try it instead of the fake headless mode, replace options.windows_headless = True with options.headless = True in utils.py. Let me know if this changes anything for you.

Still, wouldn't it make sense for the default behavior to be reusing driver instances unless explicitly choosing to manage sessions?

If by that you mean running the browser by default all the time, I don't think that's a good idea. Flaresolverr is mostly used via container images, and some people run it on very small setups with low ram. A lot of people who do not know how containers and environment variables work would be stuck with a slow system, and I can already see a lot of problems coming up here because of that. The session option was made for people who want to keep their browser running when they know they can handle the resources it's using, and I think that's the best way to do it.

Apologies, still yet to get the time to look at this. There are a few open issues about memory leaks with nodriver, might be worth looking at

It's fine, take your time, there's more to do anyway so it's not urgent. I've seen those issues when I started implementing nodriver, I'll try to implement something like @Hyperz shared or I'll try to fix how nodriver detects the processes and deletes them.

@Hyperz
Copy link

Hyperz commented Jun 5, 2024

If you want to try it instead of the fake headless mode, replace options.windows_headless = True with options.headless = True in utils.py. Let me know if this changes anything for you.

Ah. Yes that seems to work without stealing focus, thanks.

@juanfrilla
Copy link

juanfrilla commented Jun 6, 2024

I keep having
2024-06-06 12:07:21 2024-06-06 13:07:21 INFO Incoming request => POST /v1 body: {'cmd': 'request.get', 'url': 'https://www.icj-cij.org//sites/default/files/case-related/187/187-20240531-ord-01-00-en.pdf', 'maxTimeout': 5000, 'proxy': '196.51.141.167:8800'}
2024-06-06 12:07:21 version_main cannot be converted to an integer
2024-06-06 12:07:22 2024-06-06 13:07:22 INFO Challenge detected. Title found: Just a moment...
2024-06-06 12:07:27 2024-06-06 13:07:27 ERROR Error: Error solving the challenge. Timeout after 5.0 seconds.
2024-06-06 12:07:27 2024-06-06 13:07:27 INFO Response in 5.776 s

If I increase the timeout it doesnt work either.
And after a while my proxy ip of my external script gets banned as well.

I'm testing with 21hsmw/flaresolverr:nodriver

For working I mean to be able to get the cookies from the flaresolverr and send them to requests library in order to get the response.content

When flaresolverr fails to return cookies, what error exactly is being reported? Since you said it works with an external script and not scrapy, I'm not sure if it works all the time and the external tool fails, or if it's flaresolverr itself that fails to solve the challenge.

@21hsmw
Copy link
Contributor

21hsmw commented Jun 6, 2024

I keep having 2024-06-06 12:07:21 2024-06-06 13:07:21 INFO Incoming request => POST /v1 body: {'cmd': 'request.get', 'url': 'https://www.icj-cij.org//sites/default/files/case-related/187/187-20240531-ord-01-00-en.pdf', 'maxTimeout': 5000, 'proxy': '196.51.141.167:8800'} 2024-06-06 12:07:21 version_main cannot be converted to an integer 2024-06-06 12:07:22 2024-06-06 13:07:22 INFO Challenge detected. Title found: Just a moment... 2024-06-06 12:07:27 2024-06-06 13:07:27 ERROR Error: Error solving the challenge. Timeout after 5.0 seconds. 2024-06-06 12:07:27 2024-06-06 13:07:27 INFO Response in 5.776 s

If I increase the timeout it doesnt work either. And after a while my proxy ip of my external script gets banned as well.

I'm testing with 21hsmw/flaresolverr:nodriver

For working I mean to be able to get the cookies from the flaresolverr and send them to requests library in order to get the response.content

When flaresolverr fails to return cookies, what error exactly is being reported? Since you said it works with an external script and not scrapy, I'm not sure if it works all the time and the external tool fails, or if it's flaresolverr itself that fails to solve the challenge.

Can you switch LOG_LEVEL to debug and reshare the logs? It will be better to find out what's causing this.
Are you running flaresolverr with DRIVER=nodriver or is it still running with undetected-chromedriver?

Edit:
The proxy parameter should look like this in the logs 'proxy': {'url': 'http://IP:PORT'}, the one in your logs looks different.
Your proxy is actually ignored because the format is not the expected one, but I'm not sure if this is related to the timeout.

@juanfrilla
Copy link

DRIVER=nodriver

Okay, now its working, even in the server. I needed to fix the proxy and the DRIVER=nodriver
Sorry for the confusion
Thanks

@juanfrilla
Copy link

juanfrilla commented Jun 6, 2024

@21hsmw I have two questions

  1. can I limit the number of attempts?
    this are now the logs:
2024-06-06 15:35:25 DEBUG    ReqId 139728002909888 Waiting for title (attempt 11): Just a moment...
2024-06-06 15:35:27 DEBUG    ReqId 139728002909888 Timeout waiting for selector
2024-06-06 15:35:27 DEBUG    ReqId 139728002909888 Trying to find the closest Cloudflare clickable element...
2024-06-06 15:35:57 DEBUG    ReqId 139728002909888 Cloudflare element not found on the page.
2024-06-06 15:35:59 DEBUG    ReqId 139728002909888 Waiting for title (attempt 12): Just a moment...
2024-06-06 15:36:01 DEBUG    ReqId 139728002909888 Timeout waiting for selector
2024-06-06 15:36:01 DEBUG    ReqId 139728002909888 Trying to find the closest Cloudflare clickable element...
2024-06-06 15:36:08 DEBUG    ReqId 139728002909888 Cloudflare element not found on the page.
2024-06-06 15:36:10 DEBUG    ReqId 139728002909888 Waiting for title (attempt 13): Just a moment...
2024-06-06 15:36:12 DEBUG    ReqId 139728002909888 Timeout waiting for selector
2024-06-06 15:36:12 DEBUG    ReqId 139728002909888 Trying to find the closest Cloudflare clickable element...
2024-06-06 15:36:33 DEBUG    ReqId 139728002909888 Cloudflare element not found on the page.
2024-06-06 15:36:35 DEBUG    ReqId 139728002909888 Waiting for title (attempt 14): Just a moment...
2024-06-06 15:36:37 DEBUG    ReqId 139728002909888 Timeout waiting for selector
2024-06-06 15:36:37 DEBUG    ReqId 139728002909888 Trying to find the closest Cloudflare clickable element...

to change of proxies when the limit of attempt happen

  1. Does it consume a lot of resources launching the browsers?

@21hsmw
Copy link
Contributor

21hsmw commented Jun 6, 2024

  1. can I limit the number of attempts?

Attempts are just an indication of how many times flaresolverr tries to pass the challenge on the page, so there's no way to control anything based on this value right now. It will keep trying to pass the challenge until it hits the timeout, and then it will fail.

2. Does it consume a lot of resources launching the browsers?

It depends on what the page looks like and all the elements that need to be loaded, but generally it turns around 1GB of memory when it's trying to pass the challenge on my side (Linux).

@xinghui233
Copy link

在过去的几天里,我花了一些时间用 nodriver 实现了 flaresolverr 的部分。根据我自己的测试,它适用于 Linux 和 Windows,包括 Windows 的无头。如果你有时间,你能建立和测试我的nodriver-support分支吗?还有一些工作要做,但它应该按原样工作,我很好奇你是否能通过它的挑战。request.get

Thanks for your work, he got me through the challenge
But I noticed a few issues with cookies
There are some errors in nodrive's driver.cookies.set_all function. Comment out cookies = await connection.send(cdp.storage.get_cookies())
And set_all accepts List[cdp.network.CookieParam]
So you actually have to build the CookieParam list by hand, and on my machine I can't set a cookie for the current page correctly without specifying the domain for the cookie.
Below is the code I modified, it may still have some errors, and root_domain is extracted from the domain name using regular.

        await driver.cookies.clear()
        root_domain = plugin.extract_root_domain(req.url)
        cookies = []
        for cookie in req.cookies:
            if cookie['name'] == 'cf_clearance':
                domain = f".{root_domain}"
            else:
                domain = root_domain
            cookies.append(cdp.network.CookieParam(
                name=cookie['name'],  value=cookie['value'],
                path='/', domain = domain))

        await driver.cookies.set_all(cookies)

@ilike2burnthing
Copy link
Contributor Author

Got round to doing some testing, and I can see what you mean about nodriver being very verbose in debug.

Just tried on Docker so far, and it's working faster and with more success than the current release. However, there's definitely a memory leak:

memory leak

Usage after several requests:

before-restart

Usage after restart:

after-restart

There was even a couple of instances of a runaway leak that near locked up my system until I killed the Chromium processes, but still leaving a hefty chunk of memory used by Python:

runaway

I'm also getting occasional stalls that are only resolved by killing the Chromium processes or restarting the container, and which I can't reproduce with the same URL after (test URLs are just those from #1036). I can run other requests at the same time, which complete successfully. It always seems to be on the mouse move step:

mouse move to location 654.00, 288.50 where <iframe src="https://challenges.cloudflare.com/cdn-cgi/challenge-platform/h/b/turnstile/if/ov2/av0/rcv0/0/973ld/0x4AAAAAAADnPIDROrmt1Wwj/light/normal" allow="cross-origin-isolated; fullscreen; autoplay" sandbox="allow-same-origin allow-scripts allow-popups" id="cf-chl-widget-973ld" tabindex="0" title="Widget containing a Cloudflare security challenge" style="border: none; overflow: hidden; width: 300px; height: 65px;"></iframe> is located

I did notice though that killing Chromium doesn't result in an error for FlareSolverr.

@ilike2burnthing
Copy link
Contributor Author

I did find one URL which consistently caused issues:

https://ilcorsaroblu.org/index.php?page=torrents&category=0&options=0&active=0&order=3&by=2

Whereas https://ilcorsaroblu.org/index.php was fine.

@21hsmw
Copy link
Contributor

21hsmw commented Jun 7, 2024

However, there's definitely a memory leak

I can confirm this too, it seems to be worse on some site like you reported.
I was getting slowdowns on ext.to and my first guess was that it was because the page had a lot of elements, but it gets worse with https://ilcorsaroblu.org/index.php?page=torrents&category=0&options=0&active=0&order=3&by=2 because flaresolverr is literally getting oom killed.
I'm not sure where this is coming from and why, but it's probably because of the repeated requests for selectors. I'm looking for a way to "snapshot" the page and do conditions on it instead of querying the cdp every time, to see if that can reduce memory usage.

As for the zombie processes, I think I fixed it with a function in Flaresolverr, but the memory leak thing is worse than I expected and really needs some deep analysis.

@xinghui233
Copy link

However, there's definitely a memory leak

I can confirm this too, it seems to be worse on some site like you reported. I was getting slowdowns on ext.to and my first guess was that it was because the page had a lot of elements, but it gets worse with https://ilcorsaroblu.org/index.php?page=torrents&category=0&options=0&active=0&order=3&by=2 because flaresolverr is literally getting oom killed. I'm not sure where this is coming from and why, but it's probably because of the repeated requests for selectors. I'm looking for a way to "snapshot" the page and do conditions on it instead of querying the cdp every time, to see if that can reduce memory usage.

As for the zombie processes, I think I fixed it with a function in Flaresolverr, but the memory leak thing is worse than I expected and really needs some deep analysis.

I noticed some problems
Each time query_selector is used, it is reexecuted if the _node argument is not used
doc: cdp.dom.Node = await self.send(cdp.dom.get_document(-1, True))
In the Connection to which the send function is attached, there is a mapper dictionary that holds the result of each execution, so for get_document, the generated Node tree is not reclaimed, which is a huge memory footprint.
For https://ilcorsaroblu.org/index.php?page=torrents&category=0&options=0&active=0&order=3&by=2, the Node Node tree is about 400 m
I also noticed that the del method in the Browser class is not actually implemented. It might interfere with the gc garbage collection and prevent the Connection from being released.
These are just some of my opinions. He may not be right.

@xinghui233
Copy link

However, there's definitely a memory leak

I can confirm this too, it seems to be worse on some site like you reported. I was getting slowdowns on ext.to and my first guess was that it was because the page had a lot of elements, but it gets worse with https://ilcorsaroblu.org/index.php?page=torrents&category=0&options=0&active=0&order=3&by=2 because flaresolverr is literally getting oom killed. I'm not sure where this is coming from and why, but it's probably because of the repeated requests for selectors. I'm looking for a way to "snapshot" the page and do conditions on it instead of querying the cdp every time, to see if that can reduce memory usage.
As for the zombie processes, I think I fixed it with a function in Flaresolverr, but the memory leak thing is worse than I expected and really needs some deep analysis.

I noticed some problems Each time query_selector is used, it is reexecuted if the _node argument is not used In the Connection to which the send function is attached, there is a mapper dictionary that holds the result of each execution, so for get_document, the generated Node tree is not reclaimed, which is a huge memory footprint. For https://ilcorsaroblu.org/index.php?page=torrents&category=0&options=0&active=0&order=3&by=2, the Node Node tree is about 400 m I also noticed that the del method in the Browser class is not actually doc: cdp.dom.Node = await self.send(cdp.dom.get_document(-1, True))implemented. It might interfere with the gc garbage collection and prevent the Connection from being released. These are just some of my opinions. He may not be right.

Hi, I found a new issues.
utils.nd.loop().run_until_complete()It doesn't seem to destroy the asyncio you created when you're done.

I want to know if I need to destroy asyncio every time I exit the function or use asyncio for all pages.

At the same time, when checking the challenge, the number of nodes is re-fetched with each query, which leads to a high memory footprint. I think we can start by getting the tree of nodes and passing it as a parameter.

        doc: cdp.dom.Node = await tab.send(cdp.dom.get_document(-1, True))
        for selector in CHALLENGE_SELECTORS:
            found_elements = await tab.query_selector(selector=selector, _node = doc)

At the same time, nodrive's Tab and Browser seem to have circular references, which can't be released properly。
chain

Finally, I occasionally had chrome fail to start when using docker, but it returned to normal after rediscovering the request, I wonder if you have the same issue

2024-06-08 17:58:31 ERROR    Error creating Chrome Browser: 
                ---------------------
                Failed to connect to browser
                ---------------------
                One of the causes could be when you are running as root.
                In that case you need to pass no_sandbox=True

@21hsmw
Copy link
Contributor

21hsmw commented Jun 9, 2024

@xinghui233 Thanks for pointing this out. I came to the same conclusion when I did my research on this memory leak, and I was able to reduce it significantly by reusing the nodes instead of recreating them. There's still a small amount of memory consumption per run, but it's very different from the multi-GB leak we saw before.
For the asyncio loop, I added a close when it returns to the original starting point and also one when flaresolverr does the browser test. I still need to check in nodriver itself if it closes its internal loop properly.

As for the error, I had this in the very early stage of the nodriver implementation and have never seen it again. Since the container is running with a specific user and the sandbox is disabled, this error should not appear unless there is something else, but I can't replicate it with my setup at least.

@21hsmw
Copy link
Contributor

21hsmw commented Jun 9, 2024

@ilike2burnthing I pushed a new image with all the changes to docker hub. If you have some time, can you test it and report back?

@ilike2burnthing
Copy link
Contributor Author

Yea, I'll try to do this later on today.

@ilike2burnthing
Copy link
Contributor Author

Using your latest image I'm getting some weird issues, in particular FlareSolverr just stalling and Chromium not closing. Using the same troublesome link as before:

2024-06-10 01:13:18 DEBUG    ReqId 139820396279488 New instance of chromium has been created to perform the request
2024-06-10 01:13:18 DEBUG    ReqId 139820396279488 Navigating to... https://ilcorsaroblu.org/index.php?page=torrents&category=0&options=0&active=0&order=3&by=2
2024-06-10 01:13:21 INFO     ReqId 139820396279488 Challenge detected. Title found: Just a moment...
2024-06-10 01:13:21 DEBUG    ReqId 139820396279488 Waiting for title (attempt 1): Just a moment...
2024-06-10 01:13:23 DEBUG    ReqId 139820396279488 Timeout waiting for selector
2024-06-10 01:13:23 DEBUG    ReqId 139820396279488 Trying to find the closest Cloudflare clickable element...
2024-06-10 01:13:25 DEBUG    ReqId 139820396279488 mouse move to location 654.00, 288.50 where <iframe src="https://challenges.cloudflare.com/cdn-cgi/challenge-platform/h/g/turnstile/if/ov2/av0/rcv0/0/qyigu/0x4AAAAAAADnPIDROrmt1Wwj/light/normal" allow="cross-origin-isolated; fullscreen; autoplay" sandbox="allow-same-origin allow-scripts allow-popups" id="cf-chl-widget-qyigu" tabindex="0" title="Widget containing a Cloudflare security challenge" style="border: none; overflow: hidden; width: 300px; height: 65px;"></iframe> is located
2024-06-10 01:14:48 DEBUG    ReqId 139820396279488 Terminating Chromium process with PID: 516
2024-06-10 01:14:48 DEBUG    ReqId 139820396279488 Terminating zombie Chromium process with PID: 687
2024-06-10 01:14:49 DEBUG    ReqId 139820396279488 A used instance of chromium has been destroyed
2024-06-10 01:14:49 ERROR    ReqId 139820396279488 Error: Error solving the challenge. Timeout after 90.0 seconds.
2024-06-10 01:14:49 DEBUG    ReqId 139820396279488 Response => POST /v1 body: {'status': 'error', 'message': 'Error: Error solving the challenge. Timeout after 90.0 seconds.', 'startTimestamp': 1717981996037, 'endTimestamp': 1717982089651, 'version': '3.4.0'}
2024-06-10 01:14:49 INFO     ReqId 139820396279488 Response in 93.614 s
2024-06-10 01:14:49 DEBUG    ReqId 139820396279488 Using selector: EpollSelector
2024-06-10 01:14:49 INFO     ReqId 139820396279488 172.18.0.4 POST http://flaresolverr:8191/v1 500 Internal Server Error

So we're just stopped at moving the mouse for ~80s, and only when the timeout is reached does it stop. Trying it again, the everything seems to work fine (although memory usage is very high), the challenge is solved, but we again just stall until timeout:

2024-06-10 01:15:51 DEBUG    ReqId 139820387870400 Trying to find the closest Cloudflare clickable element...
2024-06-10 01:15:53 DEBUG    ReqId 139820387870400 mouse move to location 654.00, 288.50 where <iframe src="https://challenges.cloudflare.com/cdn-cgi/challenge-platform/h/g/turnstile/if/ov2/av0/rcv0/0/ecwbb/0x4AAAAAAADnPIDROrmt1Wwj/light/normal" allow="cross-origin-isolated; fullscreen; autoplay" sandbox="allow-same-origin allow-scripts allow-popups" id="cf-chl-widget-ecwbb" tabindex="0" title="Widget containing a Cloudflare security challenge" style="border: none; overflow: hidden; width: 300px; height: 65px;"></iframe> is located
2024-06-10 01:15:53 DEBUG    ReqId 139820387870400 clicking on location 654.00, 288.50
2024-06-10 01:15:54 DEBUG    ReqId 139820387870400 Cloudflare element found and clicked!
2024-06-10 01:15:56 DEBUG    ReqId 139820387870400 Waiting for title (attempt 4): Just a moment...
2024-06-10 01:15:58 DEBUG    ReqId 139820387870400 Waiting for title (attempt 4): DDoS-Guard
2024-06-10 01:15:58 DEBUG    ReqId 139820387870400 Waiting for selector (attempt 4): #cf-challenge-running
2024-06-10 01:15:58 DEBUG    ReqId 139820387870400 Waiting for selector (attempt 4): .ray_id
2024-06-10 01:15:59 DEBUG    ReqId 139820387870400 Waiting for selector (attempt 4): .attack-box
2024-06-10 01:16:00 DEBUG    ReqId 139820387870400 Waiting for selector (attempt 4): #cf-please-wait
2024-06-10 01:16:02 DEBUG    ReqId 139820387870400 Waiting for selector (attempt 4): #challenge-spinner
2024-06-10 01:16:02 DEBUG    ReqId 139820387870400 Waiting for selector (attempt 4): #trk_jschal_js
2024-06-10 01:16:03 DEBUG    ReqId 139820387870400 Waiting for selector (attempt 4): td.info #js_info
2024-06-10 01:16:03 DEBUG    ReqId 139820387870400 Waiting for selector (attempt 4): div.vc div.text-box h2
2024-06-10 01:16:04 DEBUG    ReqId 139820387870400 Waiting for redirect
2024-06-10 01:16:04 INFO     ReqId 139820387870400 Challenge solved!
2024-06-10 01:17:02 DEBUG    ReqId 139820387870400 Terminating Chromium process with PID: 710
2024-06-10 01:17:03 DEBUG    ReqId 139820387870400 A used instance of chromium has been destroyed
2024-06-10 01:17:03 ERROR    ReqId 139820387870400 Error: Error solving the challenge. Timeout after 90.0 seconds.
2024-06-10 01:17:03 DEBUG    ReqId 139820387870400 Response => POST /v1 body: {'status': 'error', 'message': 'Error: Error solving the challenge. Timeout after 90.0 seconds.', 'startTimestamp': 1717982130165, 'endTimestamp': 1717982223542, 'version': '3.4.0'}
2024-06-10 01:17:03 INFO     ReqId 139820387870400 Response in 93.377 s
2024-06-10 01:17:03 DEBUG    ReqId 139820387870400 Using selector: EpollSelector
2024-06-10 01:17:03 INFO     ReqId 139820387870400 172.18.0.4 POST http://flaresolverr:8191/v1 500 Internal Server Error

In some cases, Chromium continues to run, but in this case Python is just taking up 35% of my memory.


I'm also having an issue with invalid cookies when using a proxy:

2024-06-10 02:09:09 DEBUG    ReqId 140119762572992 Using selector: EpollSelector
2024-06-10 02:09:09 INFO     ReqId 140119762572992 Incoming request => POST /v1 body: {'postData': 'f%5B%5D=-1&allw=1&o=1&s=2&tm=-1&sns=-1&prev_allw=1&prev_a=0&prev_dla=0&prev_dlc=0&prev_dld=0&prev_dlw=0&prev_my=0&prev_new=0&prev_sd=0&prev_da=1&prev_dc=0&prev_df=1&prev_dl=1&prev_ds=0&prev_tor_type=0&df=1&da=1&dl=1&submit=%25C2%25A0%25C2%25A0Search%25C2%25A0%25C2%25A0', 'maxTimeout': 90000, 'cmd': 'request.post', 'url': 'https://seatracker.ru/tracker.php', 'proxy': {'url': 'http://IP:PORT'}}
2024-06-10 02:09:09 DEBUG    ReqId 140119762572992 Launching web browser with nodriver...

[...]

2024-06-10 02:09:11 DEBUG    ReqId 140119762572992 Navigating to... https://seatracker.ru/tracker.php
2024-06-10 02:09:11 DEBUG    ReqId 140119762572992 POST DATA: f%5B%5D=-1&allw=1&o=1&s=2&tm=-1&sns=-1&prev_allw=1&prev_a=0&prev_dla=0&prev_dlc=0&prev_dld=0&prev_dlw=0&prev_my=0&prev_new=0&prev_sd=0&prev_da=1&prev_dc=0&prev_df=1&prev_dl=1&prev_ds=0&prev_tor_type=0&df=1&da=1&dl=1&submit=%25C2%25A0%25C2%25A0Search%25C2%25A0%25C2%25A0
2024-06-10 02:09:11 DEBUG    ReqId 140119762572992 QUERY STRING: f%5B%5D=-1&allw=1&o=1&s=2&tm=-1&sns=-1&prev_allw=1&prev_a=0&prev_dla=0&prev_dlc=0&prev_dld=0&prev_dlw=0&prev_my=0&prev_new=0&prev_sd=0&prev_da=1&prev_dc=0&prev_df=1&prev_dl=1&prev_ds=0&prev_tor_type=0&df=1&da=1&dl=1&submit=%25C2%25A0%25C2%25A0Search%25C2%25A0%25C2%25A0
2024-06-10 02:09:13 INFO     ReqId 140119762572992 Challenge detected. Title found: Just a moment...
2024-06-10 02:09:13 DEBUG    ReqId 140119762572992 Waiting for title (attempt 1): Just a moment...
2024-06-10 02:09:15 DEBUG    ReqId 140119762572992 Timeout waiting for selector
2024-06-10 02:09:15 DEBUG    ReqId 140119762572992 Trying to find the closest Cloudflare clickable element...
2024-06-10 02:09:18 DEBUG    ReqId 140119762572992 mouse move to location 654.00, 288.50 where <iframe src="https://challenges.cloudflare.com/cdn-cgi/challenge-platform/h/g/turnstile/if/ov2/av0/rcv0/0/iebrf/0x4AAAAAAADnPIDROrmt1Wwj/light/normal" allow="cross-origin-isolated; fullscreen; autoplay" sandbox="allow-same-origin allow-scripts allow-popups" id="cf-chl-widget-iebrf" tabindex="0" title="Widget containing a Cloudflare security challenge" style="border: none; overflow: hidden; width: 300px; height: 65px;"></iframe> is located
2024-06-10 02:09:19 DEBUG    ReqId 140119762572992 clicking on location 654.00, 288.50
2024-06-10 02:09:19 DEBUG    ReqId 140119762572992 Cloudflare element found and clicked!
2024-06-10 02:09:21 DEBUG    ReqId 140119762572992 Waiting for title (attempt 2): Just a moment...
2024-06-10 02:09:23 DEBUG    ReqId 140119762572992 Timeout waiting for selector
2024-06-10 02:09:23 DEBUG    ReqId 140119762572992 Trying to find the closest Cloudflare clickable element...
2024-06-10 02:09:28 DEBUG    ReqId 140119762572992 Cloudflare element not found on the page.
2024-06-10 02:09:30 DEBUG    ReqId 140119762572992 Waiting for title (attempt 3): Just a moment...
2024-06-10 02:09:32 DEBUG    ReqId 140119762572992 Timeout waiting for selector
2024-06-10 02:09:32 DEBUG    ReqId 140119762572992 Trying to find the closest Cloudflare clickable element...
2024-06-10 02:09:34 DEBUG    ReqId 140119762572992 mouse move to location 654.00, 288.50 where <iframe src="https://challenges.cloudflare.com/cdn-cgi/challenge-platform/h/g/turnstile/if/ov2/av0/rcv0/0/4mw26/0x4AAAAAAADnPIDROrmt1Wwj/light/normal" allow="cross-origin-isolated; fullscreen; autoplay" sandbox="allow-same-origin allow-scripts allow-popups" id="cf-chl-widget-4mw26" tabindex="0" title="Widget containing a Cloudflare security challenge" style="border: none; overflow: hidden; width: 300px; height: 65px;"></iframe> is located
2024-06-10 02:09:37 DEBUG    ReqId 140119762572992 clicking on location 654.00, 288.50
2024-06-10 02:09:38 DEBUG    ReqId 140119762572992 Cloudflare element found and clicked!
2024-06-10 02:09:40 DEBUG    ReqId 140119762572992 Waiting for title (attempt 4): Just a moment...
2024-06-10 02:09:40 DEBUG    ReqId 140119762572992 Waiting for title (attempt 4): DDoS-Guard
2024-06-10 02:09:40 DEBUG    ReqId 140119762572992 Waiting for selector (attempt 4): #cf-challenge-running
2024-06-10 02:09:41 DEBUG    ReqId 140119762572992 Waiting for selector (attempt 4): .ray_id
2024-06-10 02:09:41 DEBUG    ReqId 140119762572992 Waiting for selector (attempt 4): .attack-box
2024-06-10 02:09:41 DEBUG    ReqId 140119762572992 Waiting for selector (attempt 4): #cf-please-wait
2024-06-10 02:09:41 DEBUG    ReqId 140119762572992 Waiting for selector (attempt 4): #challenge-spinner
2024-06-10 02:09:41 DEBUG    ReqId 140119762572992 Waiting for selector (attempt 4): #trk_jschal_js
2024-06-10 02:09:41 DEBUG    ReqId 140119762572992 Waiting for selector (attempt 4): td.info #js_info
2024-06-10 02:09:42 DEBUG    ReqId 140119762572992 Waiting for selector (attempt 4): div.vc div.text-box h2
2024-06-10 02:09:42 DEBUG    ReqId 140119762572992 Waiting for redirect
2024-06-10 02:09:42 INFO     ReqId 140119762572992 Challenge solved!
2024-06-10 02:09:42 DEBUG    ReqId 140119762572992 Tab was closed
2024-06-10 02:09:42 DEBUG    ReqId 140119762572992 Terminating Chromium process with PID: 2710
2024-06-10 02:09:43 DEBUG    ReqId 140119762572992 A used instance of chromium has been destroyed
2024-06-10 02:09:43 DEBUG    ReqId 140119762572992 Response => POST /v1 body: {'status': 'ok', 'message': 'Challenge solved!', 'solution': {'url': 'https://seatracker.ru/tracker.php', 'status': None, 'cookies': [{'version': 0, 'name': 'cf_clearance', 'value': 'REMOVED_FOR_POSTING_ON_GITHUB', 'port': None, 'port_specified': False, 'domain': '.seatracker.ru', 'domain_specified': True, 'domain_initial_dot': True, 'path': '/', 'path_specified': True, 'secure': True, 'expires': 1749521380, 'discard': True, 'comment': None, 'comment_url': None, 'rfc2109': False, '_rest': {'HttpOnly': None}}], 'userAgent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36', 'headers': {}, 'response': '<html><head>\n<meta name="robots" content="noindex, nofollow">\n<title>500 Internal Server Error</title>\n</head><body>\n<h1>Internal Server Error</h1>\n<p>The server encountered an internal error or\nmisconfiguration and was unable to complete\nyour request.</p>\n<p>Please contact the server administrator to inform them of the time this error occurred,\nand the actions you performed just before this error.</p>\n<p>More information about this error may be available\nin the server error log.</p>\n<script defer="" src="https://static.cloudflareinsights.com/beacon.min.js/vc733d5f01de84e3792a4035cd15c58a81717452547180" integrity="sha512-fqEn6JCqkzgyQXZxQOxB9z6GyWybXdsYNuqu0tW/ATUi0uJMKhFfYpk0taNyC90JiX4HZUqEp6nnOyL7/ZvjCA==" data-cf-beacon="{&quot;rayId&quot;:&quot;8915d213ff346ab1&quot;,&quot;r&quot;:1,&quot;version&quot;:&quot;2024.4.1&quot;,&quot;token&quot;:&quot;9119826e35934f24868e9b2b275ea4ae&quot;}" crossorigin="anonymous"></script>\n</body></html>'}, 'startTimestamp': 1717985349315, 'endTimestamp': 1717985383204, 'version': '3.4.0'}
2024-06-10 02:09:43 INFO     ReqId 140119762572992 Response in 33.889 s
2024-06-10 02:09:43 DEBUG    ReqId 140119762572992 Using selector: EpollSelector
2024-06-10 02:09:43 INFO     ReqId 140119762572992 172.18.0.4 POST http://flaresolverr:8191/v1 200 OK

Without a proxy/VPN I get the error above when accessing https://seatracker.ru/tracker.php in browser, but with one I can access it fine, signed in or not. I don't really see why FlareSolverr would be getting that error page while using a proxy (I've tested with the same server, it definitely works in browser).

However, when testing with https://extratorrent.st/search/?srt=added&order=desc&search=2024&new=1&x=0&y=0, the correct HTML is returned, but the cookie is still invalid.

I'll test on Windows later, where I can more easily test with the proxy passed to FlareSolverr versus a systemwide VPN.

Lastly, thanks again for all your work, I'm very appreciative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed needs investigation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet