From 543f733b1336869e6fe8d05e933477a332c9542e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Feb 2026 11:02:12 +0000 Subject: [PATCH 1/4] Initial plan From 37d0a9789f27e55d9436dadcd9b96476b860e199 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Feb 2026 11:10:13 +0000 Subject: [PATCH 2/4] feat: add HTTP/2 SETTINGS fingerprinting support - Add initial_stream_window_size, initial_connection_window_size, and max_header_list_size fields to Http2Fingerprint struct - Update all Chrome fingerprints with correct HTTP/2 SETTINGS values (6_291_456, 15_663_105, 262_144) - Update all Firefox fingerprints with HTTP/2 SETTINGS values (131_072, 12_517_377, 65_536) - Configure reqwest client with HTTP/2 SETTINGS from fingerprint Co-authored-by: barjin <61918049+barjin@users.noreply.github.com> --- impit/src/fingerprint/database/chrome.rs | 21 +++++++++++++++++++++ impit/src/fingerprint/database/firefox.rs | 9 +++++++++ impit/src/fingerprint/mod.rs | 3 +++ impit/src/impit.rs | 12 ++++++++++++ 4 files changed, 45 insertions(+) diff --git a/impit/src/fingerprint/database/chrome.rs b/impit/src/fingerprint/database/chrome.rs index c523c3b..47848f3 100644 --- a/impit/src/fingerprint/database/chrome.rs +++ b/impit/src/fingerprint/database/chrome.rs @@ -117,6 +117,9 @@ pub mod chrome_142 { ":protocol".to_string(), ":status".to_string(), ], + initial_stream_window_size: Some(6_291_456), + initial_connection_window_size: Some(15_663_105), + max_header_list_size: Some(262_144), } } @@ -255,6 +258,9 @@ pub mod chrome_136 { ":protocol".to_string(), ":status".to_string(), ], + initial_stream_window_size: Some(6_291_456), + initial_connection_window_size: Some(15_663_105), + max_header_list_size: Some(262_144), } } @@ -387,6 +393,9 @@ pub mod chrome_133 { ":protocol".to_string(), ":status".to_string(), ], + initial_stream_window_size: Some(6_291_456), + initial_connection_window_size: Some(15_663_105), + max_header_list_size: Some(262_144), } } @@ -519,6 +528,9 @@ pub mod chrome_124 { ":protocol".to_string(), ":status".to_string(), ], + initial_stream_window_size: Some(6_291_456), + initial_connection_window_size: Some(15_663_105), + max_header_list_size: Some(262_144), } } @@ -654,6 +666,9 @@ pub mod chrome_131 { ":protocol".to_string(), ":status".to_string(), ], + initial_stream_window_size: Some(6_291_456), + initial_connection_window_size: Some(15_663_105), + max_header_list_size: Some(262_144), } } @@ -783,6 +798,9 @@ pub mod chrome_100 { ":protocol".to_string(), ":status".to_string(), ], + initial_stream_window_size: Some(6_291_456), + initial_connection_window_size: Some(15_663_105), + max_header_list_size: Some(262_144), } } @@ -1081,6 +1099,9 @@ pub mod chrome_125 { ":protocol".to_string(), ":status".to_string(), ], + initial_stream_window_size: Some(6_291_456), + initial_connection_window_size: Some(15_663_105), + max_header_list_size: Some(262_144), } } diff --git a/impit/src/fingerprint/database/firefox.rs b/impit/src/fingerprint/database/firefox.rs index dd9e36a..0f6c212 100644 --- a/impit/src/fingerprint/database/firefox.rs +++ b/impit/src/fingerprint/database/firefox.rs @@ -120,6 +120,9 @@ pub mod firefox_128 { ":protocol".to_string(), ":status".to_string(), ], + initial_stream_window_size: Some(131_072), + initial_connection_window_size: Some(12_517_377), + max_header_list_size: Some(65_536), } } @@ -258,6 +261,9 @@ pub mod firefox_133 { ":protocol".to_string(), ":status".to_string(), ], + initial_stream_window_size: Some(131_072), + initial_connection_window_size: Some(12_517_377), + max_header_list_size: Some(65_536), } } @@ -401,6 +407,9 @@ pub mod firefox_135 { ":protocol".to_string(), ":status".to_string(), ], + initial_stream_window_size: Some(131_072), + initial_connection_window_size: Some(12_517_377), + max_header_list_size: Some(65_536), } } diff --git a/impit/src/fingerprint/mod.rs b/impit/src/fingerprint/mod.rs index 54e2d45..ab260cc 100644 --- a/impit/src/fingerprint/mod.rs +++ b/impit/src/fingerprint/mod.rs @@ -70,6 +70,9 @@ impl TlsFingerprint { #[derive(Clone, Debug)] pub struct Http2Fingerprint { pub pseudo_header_order: Vec, + pub initial_stream_window_size: Option, + pub initial_connection_window_size: Option, + pub max_header_list_size: Option, } /// TLS extensions configuration. diff --git a/impit/src/impit.rs b/impit/src/impit.rs index f52f796..d48f48a 100644 --- a/impit/src/impit.rs +++ b/impit/src/impit.rs @@ -238,6 +238,18 @@ impl Impit { // Use fingerprint if provided, otherwise fall back to browser enum if let Some(ref fingerprint) = config.fingerprint { tls_config_builder.with_tls_fingerprint(fingerprint.tls.clone()); + + if let Some(window_size) = fingerprint.http2.initial_stream_window_size { + client = client.http2_initial_stream_window_size(window_size); + } + + if let Some(window_size) = fingerprint.http2.initial_connection_window_size { + client = client.http2_initial_connection_window_size(window_size); + } + + if let Some(max_size) = fingerprint.http2.max_header_list_size { + client = client.http2_max_header_list_size(max_size); + } } if config.max_http_version == Version::HTTP_3 { From bea83fb11a1c7b27f4c74b0549d68f918be0cd72 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Feb 2026 09:32:09 +0000 Subject: [PATCH 3/4] fix: replace failing docker-run-action with fork Replace addnab/docker-run-action@v3 with maus007/docker-run-action-fork@207a4e2 to fix musl build failures in node and python test workflows. The fork resolves compatibility issues with the musl Alpine Linux builds. Co-authored-by: barjin <61918049+barjin@users.noreply.github.com> --- .github/workflows/node-test.yaml | 2 +- .github/workflows/python-test.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node-test.yaml b/.github/workflows/node-test.yaml index 1ee4d53..3ef58dc 100644 --- a/.github/workflows/node-test.yaml +++ b/.github/workflows/node-test.yaml @@ -147,7 +147,7 @@ jobs: cache-dependency-path: impit-node/yarn.lock architecture: x86 - name: Build in docker - uses: addnab/docker-run-action@v3 + uses: maus007/docker-run-action-fork@207a4e2a8ebf7e4b985656ba990b1e53715dce2a if: ${{ matrix.settings.docker }} with: image: ${{ matrix.settings.docker }} diff --git a/.github/workflows/python-test.yaml b/.github/workflows/python-test.yaml index 8dde50f..8f845e3 100644 --- a/.github/workflows/python-test.yaml +++ b/.github/workflows/python-test.yaml @@ -186,7 +186,7 @@ jobs: - name: pytest if: ${{ startsWith(matrix.platform.target, 'x86_64') }} - uses: addnab/docker-run-action@v3 + uses: maus007/docker-run-action-fork@207a4e2a8ebf7e4b985656ba990b1e53715dce2a with: image: alpine:latest options: -v ${{ github.workspace }}:/io -w /io/impit-python -e APIFY_HTTPBIN_TOKEN=${{ secrets.APIFY_HTTPBIN_TOKEN }} From 18893cc2f10b1778886109bde53ea2e66326ad91 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Feb 2026 07:28:27 +0000 Subject: [PATCH 4/4] fix: remove trailing && from musl build scripts Remove trailing && operators from multi-line build scripts to fix sh syntax errors. The docker-run-action converts newlines to semicolons, which caused "unexpected ;" errors when && was at line endings. Scripts now use newlines that convert cleanly to semicolons. Co-authored-by: barjin <61918049+barjin@users.noreply.github.com> --- .github/workflows/node-test.yaml | 52 ++++++++++++++++---------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/node-test.yaml b/.github/workflows/node-test.yaml index 3ef58dc..00fb04b 100644 --- a/.github/workflows/node-test.yaml +++ b/.github/workflows/node-test.yaml @@ -44,15 +44,15 @@ jobs: target: aarch64-unknown-linux-musl docker: arm64v8/node:20-alpine build: |- - export PATH="/usr/local/cargo/bin/rustup:/root/.cargo/bin:$PATH" RUSTFLAGS="-C target-feature=-crt-static --cfg reqwest_unstable" CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=gcc CC=gcc CXX="g++" GN_EXE=gn && - apk add --update --no-cache bash wget cmake musl-dev clang llvm build-base python3 gcc g++ perl && - sed -i -e 's/v[[:digit:]]\..*\//edge\//g' /etc/apk/repositories && - apk add --update --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/edge/testing rustup git gn tar ninja && - apk update && - apk upgrade && - rustup-init -y && - yarn global add pnpm lerna && - corepack enable && + export PATH="/usr/local/cargo/bin/rustup:/root/.cargo/bin:$PATH" RUSTFLAGS="-C target-feature=-crt-static --cfg reqwest_unstable" CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=gcc CC=gcc CXX="g++" GN_EXE=gn + apk add --update --no-cache bash wget cmake musl-dev clang llvm build-base python3 gcc g++ perl + sed -i -e 's/v[[:digit:]]\..*\//edge\//g' /etc/apk/repositories + apk add --update --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/edge/testing rustup git gn tar ninja + apk update + apk upgrade + rustup-init -y + yarn global add pnpm lerna + corepack enable yarn --cwd impit-node build - host: ubuntu-22.04-arm target: aarch64-unknown-linux-gnu @@ -62,23 +62,23 @@ jobs: docker: node:20-alpine # Script taken from https://github.com/napi-rs/napi-rs/blob/main/alpine.Dockerfile build: | - export PATH="/aarch64-linux-musl-cross/bin:/usr/local/cargo/bin/rustup:/root/.cargo/bin:$PATH" RUSTFLAGS="-C target-feature=-crt-static --cfg reqwest_unstable" CC="clang" CXX="clang++" GN_EXE=gn && - apk add --update --no-cache bash wget cmake musl-dev clang llvm build-base python3 && - sed -i -e 's/v[[:digit:]]\..*\//edge\//g' /etc/apk/repositories && - apk add --update --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/edge/testing rustup git gn tar ninja && - apk update && - apk upgrade && - rustup-init -y && - yarn global add pnpm lerna && - rustup target add aarch64-unknown-linux-musl && - wget https://github.com/napi-rs/napi-rs/releases/download/linux-musl-cross%4010/aarch64-linux-musl-cross.tgz && - tar -xvf aarch64-linux-musl-cross.tgz && - rm aarch64-linux-musl-cross.tgz && - apk add perl && - ln -s /usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/crtbeginS.o /usr/lib/crtbeginS.o && - ln -s /usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/crtendS.o /usr/lib/crtendS.o && - ln -s /usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/libgcc.a /usr/lib/libgcc.a && - corepack enable && + export PATH="/aarch64-linux-musl-cross/bin:/usr/local/cargo/bin/rustup:/root/.cargo/bin:$PATH" RUSTFLAGS="-C target-feature=-crt-static --cfg reqwest_unstable" CC="clang" CXX="clang++" GN_EXE=gn + apk add --update --no-cache bash wget cmake musl-dev clang llvm build-base python3 + sed -i -e 's/v[[:digit:]]\..*\//edge\//g' /etc/apk/repositories + apk add --update --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/edge/testing rustup git gn tar ninja + apk update + apk upgrade + rustup-init -y + yarn global add pnpm lerna + rustup target add aarch64-unknown-linux-musl + wget https://github.com/napi-rs/napi-rs/releases/download/linux-musl-cross%4010/aarch64-linux-musl-cross.tgz + tar -xvf aarch64-linux-musl-cross.tgz + rm aarch64-linux-musl-cross.tgz + apk add perl + ln -s /usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/crtbeginS.o /usr/lib/crtbeginS.o + ln -s /usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/crtendS.o /usr/lib/crtendS.o + ln -s /usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/libgcc.a /usr/lib/libgcc.a + corepack enable yarn --cwd impit-node build --target x86_64-unknown-linux-musl - host: macos-latest target: aarch64-apple-darwin