Skip to content

chore(emulation): fix process transport binary resolution and safari profiles#20

Merged
danielhe4rt merged 2 commits into
0.xfrom
chore/fix-safari-profiles
May 15, 2026
Merged

chore(emulation): fix process transport binary resolution and safari profiles#20
danielhe4rt merged 2 commits into
0.xfrom
chore/fix-safari-profiles

Conversation

@danielhe4rt
Copy link
Copy Markdown
Contributor

Summary

ProcessTransport binary resolution

  • Resolve curl_impersonate binary per browser profile (curl_chrome145, curl_firefox147, curl_safari180, etc.) instead of using the generic curl-impersonate binary
  • Add impersonateTarget() to Browser enum — maps each browser to its curl_impersonate binary suffix
  • Add impersonateTarget field to Profile, set by Catalog::resolve()
  • Add -sS flag for detailed error messages in stderr (was losing curl error details with just -s)

Safari profile alignment

  • Convert v18/iPad18/iOS18 from wreq profiles to CI profiles matching curl_safari180 binary wire fingerprint
  • Add ciHttp2_180() with ENABLE_CONNECT_PROTOCOL setting (Safari 18.0 sends setting 8:1, Safari 18.4+ does not)
  • Remove unused wreq helpers (baseTlsOptions, baseHttp2Options, baseHeaders, baseHeaderOrder, buildProfile, CIPHER_LIST, SIGALGS_LIST)

Fix

  • Fix FfiTransport SOCKS5 proxy type from 7 to 5 (was incorrectly using SOCKS5_HOSTNAME value)

Verified against wire

All browsers tested against tls.peet.ws produce unique, correct TLS/HTTP2 fingerprints via ProcessTransport:

  • Chrome: unique JA3 per version, correct H2 SETTINGS and pseudo order
  • Firefox: unique JA3, correct GREASE=off, correct m,p,a,s pseudo order
  • Safari: GREASE=on, correct m,s,a,p pseudo order for 18.x+, correct settings (8:1 for 18.0, 9:1 for 18.4+)
  • Edge/Tor: unique fingerprints

Test plan

  • SafariTest updated: v18 now tests greaseEnabled=true and pseudo=msap
  • All 1129 tests pass
  • PHPStan level max: 0 errors

…profiles

process transport: resolve curl_impersonate binary per browser profile
(curl_chrome145, curl_firefox147, etc) instead of using generic binary.
add impersonateTarget to Browser enum and Profile. add -sS flag for
detailed error messages in stderr.

safari profiles: convert v18/iPad18/iOS18 from wreq profiles to ci
profiles matching curl_safari180 binary wire fingerprint. add
ciHttp2_180 with ENABLE_CONNECT_PROTOCOL setting. remove unused wreq
helpers (baseTlsOptions, baseHttp2Options, baseHeaders, baseHeaderOrder,
buildProfile, CIPHER_LIST, SIGALGS_LIST).

fix FfiTransport SOCKS5 proxy type from 7 to 5 (was using
SOCKS5_HOSTNAME value).
…inary

chrome 131: remove maxConcurrentStreams and maxFrameSize from wreq
profile — curl_chrome131 binary does not send these settings.

firefox 135: remove maxConcurrentStreams and maxHeaderListSize from wreq
profile — curl_firefox135 binary does not send these settings.

verified: all 41 available binaries now produce zero profile-vs-wire
mismatches against tls.peet.ws.
@danielhe4rt danielhe4rt merged commit f8853c9 into 0.x May 15, 2026
0 of 14 checks passed
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.

1 participant