Skip to content

feat: send the real browsers' HTTP/2 SETTINGS - #618

Open
jackc625 wants to merge 1 commit into
apify:masterfrom
jackc625:feat/h2-settings
Open

jackc625 wants to merge 1 commit into
apify:masterfrom
jackc625:feat/h2-settings

Conversation

@jackc625

Copy link
Copy Markdown
Contributor

Fixes the HTTP/2 SETTINGS of the Chrome and Firefox profiles, so the Akamai fingerprint now matches real Chrome 116–157 and Firefox 128–158. It uses apify/h2#6 (h2 0.4.7 → 0.4.13).

  • Chrome: no longer sends MAX_FRAME_SIZE.
  • Firefox: no longer sends MAX_HEADER_LIST_SIZE. firefox_128 also sends 9:1 and no ENABLE_PUSH, like real Firefox 128, so a server may push; h2 refuses those streams.
  • ios_18 and okhttp: unchanged.

Two things to know: like the pseudo-header order, this goes through process-wide env vars, so with several profiles in one process, the last client built decides which of these settings are sent. And Http2Fingerprint has three new fields; max_header_list_size: None now means "not sent" instead of hyper's 16 KiB default.

Http2Fingerprint gets max_frame_size, send_enable_push and
no_rfc7540_priorities. impit turns the settings a profile doesn't send,
and setting 9, into IMPIT_H2_OMIT_SETTINGS and
IMPIT_H2_NO_RFC7540_PRIORITIES. It sets both next to
IMPIT_H2_PSEUDOHEADERS_ORDER whenever a fingerprint is present, empty
when nothing applies, so a profile built later doesn't inherit an
earlier one's values.

- Chrome (every profile, 100 to 157): MAX_FRAME_SIZE is no longer sent.
- Firefox 133, 135, 144, 158: MAX_HEADER_LIST_SIZE is no longer sent.
- Firefox 128: that too, plus no ENABLE_PUSH and
  SETTINGS_NO_RFC7540_PRIORITIES = 1, like real Firefox 128.
- ios_18, okhttp3/4/5 and vanilla mode are unchanged: ios_18 and okhttp
  now write out hyper's 16384 defaults for both settings.

The wire effect needs the apify/h2 change that reads these env vars.
This commit bumps apify/h2 to the merge of apify/h2#6, which takes h2
from 0.4.7 to 0.4.13.

For custom fingerprints, max_header_list_size: None now means "not
sent" instead of hyper's 16 KiB default, and struct literals of
Http2Fingerprint must set the new fields.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T17:08:52.050488Z bd371d8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch has not been deployed

No deployments
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