Skip to content

feat: add new OkHTTP fingerprints #416

Merged
barjin merged 6 commits intoapify:masterfrom
yfe404:master
Mar 26, 2026
Merged

feat: add new OkHTTP fingerprints #416
barjin merged 6 commits intoapify:masterfrom
yfe404:master

Conversation

@barjin
Copy link
Copy Markdown
Member

@barjin barjin commented Mar 19, 2026

Adds profiles for emulating the fingerprints of the OkHTTP library (JVM / Android HTTP client).

Closes #411

yfe404 added 2 commits March 13, 2026 18:57
- Add okhttp3 preset: TLS 1.2 only, CBC/RSA cipher suites, 9 extensions
- Add okhttp5 preset: same TLS as okhttp4, different user-agent
- Wire impit's extension_order to rustls's contiguous_extensions for
  deterministic TLS extension ordering (fixes JA3 hash randomization)
- Restrict to TLS 1.2 when fingerprint has supported_versions: false
- Point rustls patch to yfe404/rustls fork with extension_order support
- Update Node.js and Python bindings with new browser variants
…order

feat: OkHttp 3/5 presets + deterministic TLS extension ordering
@barjin barjin assigned yfe404 and barjin and unassigned barjin Mar 19, 2026
Copy link
Copy Markdown
Member Author

@barjin barjin left a comment

Choose a reason for hiding this comment

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

Thank you for the changes @yfe404 !

I have few ideas regarding the changes, but only the Cargo.toml one is directly actionable. The rest are rather discussion points, feel free to treat them as such :)

.iter()
.filter_map(|ext| {
match ext {
ExtensionType::ServerName => Some(RustlsExtType::ServerName),
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is not necessary for now, but perhaps we could unify the enums somehow (use the rustls enum here?), so we don't have this duplicity. wdyt, does it make sense?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Agreed, the 1:1 mapping seem is redundant. Worth refactoring later imo

yfe404 added 2 commits March 20, 2026 10:36
…lify TLS version branching

- Point rustls dependency back to apify/rustls at merged commit
- Wire supported_versions through to TlsExtensionsConfig so OkHttp 3's
  false value flows to rustls for extension suppression
- Collapse 3 ClientConfig branches into 2 by extracting protocol_versions
yfe404 added 2 commits March 23, 2026 20:39
… fields

The previous rustls rev (c908559) was missing the supported_versions
and extension_order fields on TlsExtensionsConfig, causing compilation
failures. Updated to impit-main HEAD (d19ecc2b) which includes both
the aws-lc-rs bump and the extension ordering feature.
Copy link
Copy Markdown
Member Author

@barjin barjin left a comment

Choose a reason for hiding this comment

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

Thank you @yfe404 !

the failing tests are likely a result of the custom fork (outside of the apify org). I'll merge and try to release now. Cheers!

@barjin barjin merged commit 61bf9dc into apify:master Mar 26, 2026
45 of 47 checks passed
yfe404 added a commit to yfe404/proxy-mcp that referenced this pull request Mar 27, 2026
Picks up apify/impit#416 which adds okhttp3, okhttp4, and okhttp5
browser presets. Closes #8.
@barjin
Copy link
Copy Markdown
Member Author

barjin commented Mar 27, 2026

Released in 0.13.0.

@yfe404
Copy link
Copy Markdown
Contributor

yfe404 commented Mar 27, 2026

Thanks @barjin :)

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.

feat: add OKHttp3 / 4 and other mobile fingerprints

4 participants