Skip to content

Cloudflare killer improved#434

Open
TJMolina wants to merge 12 commits intoLagradOst:masterfrom
TJMolina:cloudflarekillerImproved
Open

Cloudflare killer improved#434
TJMolina wants to merge 12 commits intoLagradOst:masterfrom
TJMolina:cloudflarekillerImproved

Conversation

@TJMolina
Copy link
Copy Markdown
Contributor

Implemented Cloudflare bypass support for images and improved the Cloudflare challenge solver.

  • Added a DynamicInterceptor to Coil's ImageLoader to conditionally route image requests through the CloudflareKiller.
  • Updated TextAdapter and UIHelper to pass Cloudflare requirements when binding images in the reader.
  • Refactored CloudflareKiller with a semaphore to prevent concurrent challenge resolutions and improved challenge detection logic.
  • Enhanced WebViewResolver with a JavaScript injection to automatically attempt to submit Cloudflare Turnstile/challenge forms.
  • Updated MainAPI to automatically inject Cloudflare bypass headers into search and stream response poster headers when enabled.

…udflare challenge solver.

- Added a `DynamicInterceptor` to Coil's `ImageLoader` to conditionally route image requests through the `CloudflareKiller`.
- Updated `TextAdapter` and `UIHelper` to pass Cloudflare requirements when binding images in the reader.
- Refactored `CloudflareKiller` with a semaphore to prevent concurrent challenge resolutions and improved challenge detection logic.
- Enhanced `WebViewResolver` with a JavaScript injection to automatically attempt to submit Cloudflare Turnstile/challenge forms.
- Updated `MainAPI` to automatically inject Cloudflare bypass headers into search and stream response poster headers when enabled.
@TJMolina
Copy link
Copy Markdown
Contributor Author

If you accept this PR, I’ll be able to make another PR with the providers that use CloudflareKiller. Until then, I can’t submit a PR with them.

- Added `NovelasLigerasProvider`, `DevilNovelsProvider`, `FenrirRealProvider`, `FuckNovelPiaProvider`, `LnoriProvider`, `NovelManiaProvider`, `PlanetaEpubProvider`, `RewayatProvider`, `ReadhiveProvider`, `VynovelProvider`, and `WuxiaClickProvider`.
- Refactored `RanobesProvider` and `WtrLabProvider` with improved chapter fetching, pagination logic, and JSON parsing.
- Updated `KolNovelProvider` to use `free.kolnovel.com` and adjusted selectors for search and main page.
- Fixed `WPReader` chapter content extraction and search logic.
- Improved `ReadActivityViewModel` image handling by properly resolving relative paths and converting `image` tags to `img`.
- Enhanced `BookDownloader2` notification logic and added error handling for `WorkManager` initialization.
- Added language flags to provider names in search and language selection dialogs.
- Updated colors for various providers in `colors.xml`.
Copy link
Copy Markdown
Owner

@LagradOst LagradOst left a comment

Choose a reason for hiding this comment

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

The code looks good in general. Will do further testing later, before I merge.

val uniqueWorkName = "${ID_REFRESH_READINGPROGRESS}_$currentTab"
(WorkManager.getInstance(context)).enqueueUniqueWork(

val workManager = try {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This should be a function, so all instances of WorkManager.getInstance will not crash.

@TJMolina
Copy link
Copy Markdown
Contributor Author

I'm still reviewing this PR, in a few hours I'll upload it 100% functional.

@TJMolina TJMolina force-pushed the cloudflarekillerImproved branch from fcf2cb2 to 867305c Compare April 15, 2026 00:39
@TJMolina
Copy link
Copy Markdown
Contributor Author

done... i think so haha

- Refactored `NovelFireProvider` and `LightNovelTranslationsProvider` to improve data extraction and error handling.
- Updated `AnnasArchive` main URL.
- Enhanced `CloudflareKiller` with more granular cookie clearing and persistence logic.
- Cleaned up unused data classes in `MtlNovelsProvider`.
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.

2 participants