-
Notifications
You must be signed in to change notification settings - Fork 1.4k
docs(proposal): Firefox-based stealth option for browser helper #5847
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
Draft
feder-cr
wants to merge
1
commit into
jxxghp:v2
Choose a base branch
from
feder-cr:proposal-invisible-firefox-helper
base: v2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+33
−0
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # Firefox-based stealth option for browser helper (proposal) | ||
|
|
||
| > Status: Draft proposal | ||
| > Created: 2026-05-26 | ||
| > Tracking discussion: TBD | ||
|
|
||
| ## Overview | ||
|
|
||
| Optional Firefox-based stealth choice for `PLAYWRIGHT_BROWSER_TYPE`, parallel to the existing `chromium` and `firefox` values added in PR #5250. Selected via config, no change to defaults. | ||
|
|
||
| ## Motivation | ||
|
|
||
| CloakBrowser is already wired into `app/helper/browser.py` as the Chromium-stealth path. Private trackers and some media-info sources historically work better when contacted by a Firefox UA, and a few have started rate-limiting CloakBrowser's Chromium UA pattern. A Firefox-stealth option lets operators pick the engine that fits each tracker without changing helper code. | ||
|
|
||
| ## Proposed change | ||
|
|
||
| Add `invisible_firefox` as a third valid value for `PLAYWRIGHT_BROWSER_TYPE`. When selected, `PlaywrightHelper` resolves to `invisible_playwright` (https://github.com/feder-cr/invisible_playwright) which drives a patched Firefox 150 binary (https://github.com/feder-cr/invisible_firefox, MPL-2, same license as Firefox upstream). Fingerprint patches at the C++ source level so there are no JS shims to detect. | ||
|
|
||
| Drop-in compatible with the existing `BrowserContext` / `BrowserPage` / `BrowserElement` protocols in `app/helper/browser.py`. Optional dependency, only imported when the value is selected. | ||
|
|
||
| ## Out of scope | ||
|
|
||
| No change to existing `chromium` or `firefox` values. No change to CloakBrowser path. No change to defaults. | ||
|
|
||
| ## Maintenance | ||
|
|
||
| Issues against the backend route to feder-cr/invisible_playwright. Only ask of this repo would be the resolver branch in `PlaywrightHelper.__init__` plus a config docstring update. | ||
|
|
||
| --- | ||
|
|
||
| ## 简介 | ||
|
|
||
| 为 `PLAYWRIGHT_BROWSER_TYPE` 增加可选的 Firefox 隐身后端,与 PR #5250 增加的 `chromium` 和 `firefox` 选项并行。通过配置开启,不影响默认行为。详细方案见上方英文部分。 | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In
app/helper/browser.py,PlaywrightHelpercurrently hardcodes the use ofcloakbrowser(viaself.__launch_cloakbrowser_context) in bothactionandget_page_sourcemethods, completely ignoringself.browser_type.Therefore, simply adding a resolver branch in
PlaywrightHelper.__init__will not be sufficient. The execution methods (actionandget_page_source) will also need to be refactored to dynamically select and launch the appropriate browser context (e.g., standard Playwright, CloakBrowser, orinvisible_playwright) based onself.browser_typeorself.__browser_emulation().Please update the proposal to reflect these required changes in the browser helper execution flow.