fix: pass Impersonate option to extractor HTTP client#37
Merged
stefanodvx merged 1 commit intogovdbot:mainfrom Mar 9, 2026
Merged
Conversation
The `Impersonate` field from extractor config was not being forwarded to `NewHTTPClientOptions` when building the extractor context in `FromURL()`. This meant that even when `impersonate: true` was set in the extractor YAML configuration, the HTTP client would never call `NewChromeClient()`, effectively making TLS fingerprint impersonation a no-op for all extractors. This one-liner adds the missing field passthrough, aligning `Impersonate` with the other options (`Proxy`, `DisableProxy`, etc.) that are already forwarded correctly.
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.
Summary
The
Impersonatefield from the extractor YAML configuration is not forwarded toNewHTTPClientOptionswhen constructing theExtractorContextinFromURL()(internal/extractors/util.go).This means that even when an extractor has
impersonate: trueset in its configuration, the HTTP client is always created withImpersonate: false. TheNewChromeClient()function — which provides Chrome TLS fingerprint impersonation to bypass JA3/JA4 detection — is never invoked.Root cause
In
internal/extractors/util.go, theNewHTTPClientOptionsstruct is populated with all config fields (Cookies,EdgeProxy,DownloadProxy,Proxy,DisableProxy) exceptImpersonate. This field was likely missed when the impersonation feature was originally added in commit3b625c8.Fix
A single line addition that passes
cfg.Impersonatethrough toNewHTTPClientOptions, consistent with how all other config fields are already handled:Impact
impersonate: truein their YAML config will correctly useNewChromeClient(), which sets Chrome-like cipher suites, TLS versions, and curve preferences.This is critical for extractors targeting services that perform TLS fingerprinting (e.g., Facebook, Instagram).
Compliance
impersonate: trueare unaffectedfix: ...)