TachiyomiSY
TachiyomiSY copied to clipboard
feat: add FlareSolverr to bypass cloudflare
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
https://github.com/jobobby04/TachiyomiSY/assets/41852205/23677279-0c1f-4b8a-8dbd-5597dcd804ea
With FlareSolverr
https://github.com/jobobby04/TachiyomiSY/assets/41852205/dee7ac92-7ed7-4b87-bf2d-ec93d4c7fec8
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.
Do we still need to enable DoH when using this?🤔
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.
Does this PR include the functionality of adding Captcha Solvers in addition ?🤔
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.
Hey! @kaiserbh I would like to ask for your help with something Since "i18n/.../strings.xml" is strings Fork from the mihon, new features of SY will basically be placed in i18n-sy for differentiation This way during the translation process it will not be confused with the original Thanks!😊
Also syncyomi's strings https://github.com/jobobby04/TachiyomiSY/pull/1005
Refactored. But flareSolverr is not working on my linux for some reason getting hit into timeout loop (https://github.com/FlareSolverr/FlareSolverr/issues/1036), so I will need to test this on windows, don't merge it yet.
Try changing the timeout on the network okhttpclient
Okay so @jobobby04, this works well kinda, I can't get it to work when I use the networkhelper
cookie manager... But If I use the cookieManager: CookieManager = CookieManager.getInstance()
It works fine, well it fails to load the browse page (refer to the video basically that) the first time it fetches but it works afterwards. I don't know how the cookie manager works and It should technically work as we are building new request with the cookies. If you can have a look at this and see what's the issue, I would appreciate it.
I made two commit, one with the network helper cookie jar (https://github.com/jobobby04/TachiyomiSY/pull/1124/commits/89023559666c1d45619d78b6ce498526fd9ab464) and the other one accessing it directly (https://github.com/jobobby04/TachiyomiSY/pull/1124/commits/edf35a0a3655cf2a832fa7dd2c7b5cd5028a0bbb).
Also I am using this version of FlareSolverr:
---
version: "2.1"
services:
flaresolverr:
# DockerHub mirror flaresolverr/flaresolverr:latest
image: 21hsmw/flaresolverr:nodriver
container_name: flaresolverr2
environment:
- LOG_LEVEL=${LOG_LEVEL:-info}
- LOG_HTML=${LOG_HTML:-false}
- CAPTCHA_SOLVER=${CAPTCHA_SOLVER:-none}
- TZ=UTC
ports:
- "${PORT:-8191}:8191"
restart: unless-stopped
Since the other ones doesn't seem to work.
Any good news here? 🫠
is this working yet?
@kaiserbh Do u wanna try merge on Komikku…?
it's abandoning ? the idea was great!