Repository navigation
Conversation
… of a bare 403 daotekno.com answers HTTP 403 "Access Denied" to any User-Agent carrying the Android WebView '; wv' token, which is LNReader's own UA, and asks readers to open the site in Google Chrome. The plugin hid this behind a hardcoded Chrome UA that cannot reuse the WebView's Cloudflare clearance, so users only saw 'Request failed: 403'. Send the app's own User-Agent and name the cause: the site's in-app browser block, or a Cloudflare challenge that WebView can pass.
…ock is reported The hardcoded mobile Chrome User-Agent cannot reuse the cf_clearance cookie that LNReader's WebView earns under the app's own UA, so app requests were re-challenged by Cloudflare and never reached the site's in-app-browser 'Access Denied' page. Readers could only ever see the Cloudflare message, not why the source refuses to load. Drop the hardcoded browser headers so fetchApi sends the app's UA, which lets the 'blocks reading in apps and in-app browsers' error fire. Runners outside the app were already blocked by Cloudflare either way.
RibatTRW
marked this pull request as draft
October 8, 2026 23:30
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
plugins/english/daotekno.ts: removed the spoofed mobile-Chrome headers (User-Agent,sec-ch-ua*,Sec-Fetch-*). Requests now go out with the app's own User-Agent through a singlefetchHtmlhelper that replacesfetchSite, and all call sites (popularNovels,parseNovel,parseChapter,searchNovels) use it.cf-mitigated: challenge) tells the reader to open the site in WebView and retry. A 403 whose body says the in-app browser is not allowed reports that daotekno.com blocks reading in apps and asks readers to open it in Google Chrome. Any other failure keepsRequest failed: <status>. The HTTP status stays attached to the error.🤖 Generated with Claude Code
Supersedes #2654 (closed).
Screenshots
These come from this repo's plugin playground, not from the LNReader app. The Android toolchain isn't installed on the machine that made this change, so this fix has not been tested in the app.
How the playground was set up:
Mozilla/5.0 (Linux; Android 14; Pixel 8 Build/AP2A.240805.005; wv) … Version/4.0 Chrome/126.0.0.0 Mobile Safari/537.36).cf_clearancecookie came from that same browser session after it passed Cloudflare. It was posted to the proxy's/settings.The source still does not load. That is the site's choice. These screenshots show the plugin now naming the cause instead of saying
Request failed: 403.1. What the app's WebView gets from daotekno.com. This is the site's own page, served with HTTP 403 to any UA containing
; wv. The original reporter also saw this page in the LNReader app's WebView on a real Android phone.2. Before passing Cloudflare (no cookie): Search shows the Cloudflare/WebView message.
3. After passing Cloudflare with the WebView's cookie: Search, Parse Novel and Parse Chapter each show the in-app-block message.
The playground's Popular tab doesn't display plugin errors; it only logs them to the console.
Why the hardcoded User-Agent was removed
This was checked against the live site on 2026-10-08. The test bundled the plugin and copied LNReader's
fetchApi, where the app UA is a default header that a plugin can override.; wvtoken in the User-Agent. A UA identical except for; wvgets HTTP 200. TheX-Requested-Withheader and the app's default fetch headers do not trigger it.cf_clearancecookie only works with the User-Agent that earned it. LNReader's WebView earns it under the app's own UA. The cookie paired with any other UA gets403 cf-mitigated: challengeagain.npm run check:pluginand CI, were already blocked by Cloudflare with or without the hardcoded UA.check:pluginreports INCONCLUSIVE (HTTP 403 Cloudflare), the same result feat(english): add DaoTekno source plugin for daotekno.com #2547 got in CI.wvmobile Chrome UA (a browser session, not the app), the plugin's parsers still return 50 novels, 18 search results, 497 chapters and the chapter text.Related: #2547 (original plugin), #2543 (original request).
This PR was written by an AI agent (Claude), and the change and its tests were AI-driven. No human has reviewed it yet.
Risk Assessment
✅ Low: The change is confined to one plugin's fetch wrapper. It turns the 403 into an honest in-app-browser message, and the version is bumped. The header removal was already raised and declined by the user, so I did not re-raise it.
Testing
The real site was unreachable (Cloudflare 403, INCONCLUSIVE), so I bundled the actual plugin and drove it against a local mock server for each response type. The in-app block, the Cloudflare challenge, a 500, a plain 403 and a 200 catalog all behaved as intended. No screenshots were produced because the plugin has no rendered surface I could drive here. The real in-app WebView and the real site were not exercised. One warning is raised about the removed request headers.
Evidence: Driver transcript
Evidence: Driver script
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
plugins/english/daotekno.ts:37- The plugin no longer sends the master request headers or mobile Chrome User-Agent; it uses bare fetchApi. Review decision review-2 said to restore them exactly. The author's latest commit (6c37afb) deliberately reversed that. I did not resolve the conflict. Outside the app, requests go out with no browser User-Agent (my run showed only a minimal Accept/Sec-Fetch-Mode set), so the 'Mobile Only Content' interstitial path is untested.npm cinpm run check:plugin -- plugins/english/daotekno.ts(INCONCLUSIVE: Cloudflare HTTP 403 from the real site)node drive.mjs: bundles the real plugin with esbuild and calls popularNovels against a local HTTP server returning the in-app Access Denied 403, a cf-mitigated challenge, a 500, a plain 403 and a 200 catalog✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.