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

feat: add FlareSolverr to bypass cloudflare #1124

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

kaiserbh
Copy link

Added https://github.com/FlareSolverr/FlareSolverr to bypass cloudflare anti-bot protection.

A brief summary of FlareSolverr:

FlareSolverr is a proxy server designed to bypass Cloudflare and DDoS-GUARD protection. It works by starting a proxy server that uses Selenium with undetected-chromedriver to open a web browser (Chrome), navigate to a URL with user parameters, and wait until the Cloudflare challenge is solved before sending back the HTML code and cookies. These cookies can then be used to bypass Cloudflare with other HTTP clients.

Before and after

With FlareSolverr Without
Hello OKay

Settings in the advance section.

Video:

Without flareSolverr

Screen_recording_not_working.mp4

With FlareSolverr

flareSolverr_works_compressed_700k.mp4

Note

I think everything works fine but I am not sure if the cookie will be persisted at the start, for example in the flaresolverr video it shows no result found even though it managed to get the cookie. Not sure exactly but unless we restart

Ignore the above pushed a fix for it, I should have used the cookie in the Header asap instead of waiting for it to populate cookie jar. The stuff like no result or click on chapter and clicking retry as well it's fixed. Essentially it should load on first visit. Of course that is if the source is working.

sousou-no-frieren-frieren

Signed-off-by: KaiserBh <kaiserbh@proton.me>
Signed-off-by: KaiserBh <kaiserbh@proton.me>
Signed-off-by: KaiserBh <kaiserbh@proton.me>
Signed-off-by: KaiserBh <kaiserbh@proton.me>
I don't think reverse proxy going to work maybe it does but no luck on my end not that I need it tbh, I think using tailscale or wireguard should suffice and safer as there is no security in flaresolverr.

Signed-off-by: KaiserBh <kaiserbh@proton.me>
We should make sure the cookie is attached when the request proceeds that way we don't have to relay on the app cookie jar state, for example we get the result immediately instead of going out of the extension and going back in, same withe the chapters, they use subdomain and it's random, so we need to make sure the cf_clearance is added to the subdomains dynamically.

Signed-off-by: KaiserBh <kaiserbh@proton.me>
@kaiserbh kaiserbh changed the title feat: add flare solverr bypass cloudflare feat: add FlareSolverr bypass cloudflare Mar 18, 2024
@kaiserbh kaiserbh changed the title feat: add FlareSolverr bypass cloudflare feat: add FlareSolverr to bypass cloudflare Mar 18, 2024
Signed-off-by: KaiserBh <kaiserbh@proton.me>
@NeKoOuO

This comment has been minimized.

@kaiserbh
Copy link
Author

Do we still need to enable DoH when using this?🤔

Don't think so, but I tested it with both and works with and without.

@NeKoOuO
Copy link

NeKoOuO commented Apr 5, 2024

Does this PR include the functionality of adding Captcha Solvers in addition ?🤔

@kaiserbh
Copy link
Author

kaiserbh commented Apr 5, 2024

Does this PR include the functionality of adding Captcha Solvers in addition ?🤔

It's possible, but that depends on you, FlareSolverr already has the capability.

https://github.com/FlareSolverr/FlareSolverr?tab=readme-ov-file#environment-variables

You can read more on it.

@NeKoOuO

This comment has been minimized.

Copy link
Owner

@jobobby04 jobobby04 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is a Suwayomi implementation of FlareSolverr that uses some of my comments. Feel free to take things from it.
https://github.com/Suwayomi/Suwayomi-Server/pull/844/files

Signed-off-by: KaiserBh <kaiserbh@proton.me>
@kaiserbh
Copy link
Author

kaiserbh commented Apr 13, 2024

Refactored.
But flareSolverr is not working on my linux for some reason getting hit into timeout loop (FlareSolverr/FlareSolverr#1036), so I will need to test this on windows, don't merge it yet.

@jobobby04
Copy link
Owner

Try changing the timeout on the network okhttpclient

@NeKoOuO
Copy link

NeKoOuO commented Apr 17, 2024

Any news here? 👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants