From 478844f2ba6d7968701060d240802d2f7e2c12aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jind=C5=99ich=20B=C3=A4r?= Date: Tue, 2 Dec 2025 10:21:48 +0100 Subject: [PATCH 1/7] fix: proxy authenticates with `username` only --- Cargo.lock | 5 ++--- impit-node/Cargo.toml | 2 +- impit-node/test/basics.test.ts | 25 ++++++++++++++++++++++++- impit-python/Cargo.toml | 2 +- impit/Cargo.toml | 2 +- 5 files changed, 29 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 176209fe..20571602 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2455,9 +2455,8 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d429f34c8092b2d42c7c93cec323bb4adeb7c67698f70839adec842ec10c7ceb" +version = "0.12.24" +source = "git+https://github.com/seanmonstar/reqwest?rev=74e6f84152a48f00106fe72e0bd2cfc1a4254c93#74e6f84152a48f00106fe72e0bd2cfc1a4254c93" dependencies = [ "async-compression", "base64", diff --git a/impit-node/Cargo.toml b/impit-node/Cargo.toml index 6d1fc567..06ce5bc3 100644 --- a/impit-node/Cargo.toml +++ b/impit-node/Cargo.toml @@ -13,7 +13,7 @@ impit = { path="../impit" } rustls = { version="0.23.16" } tokio = { version="1.41.1", features = ["full"] } h2 = "0.4.7" -reqwest = "0.12.9" +reqwest = { rev="74e6f84152a48f00106fe72e0bd2cfc1a4254c93", git="https://github.com/seanmonstar/reqwest" } tokio-stream = "0.1.17" bytes = "1.9.0" diff --git a/impit-node/test/basics.test.ts b/impit-node/test/basics.test.ts index 30b9a9fd..2b49d22f 100644 --- a/impit-node/test/basics.test.ts +++ b/impit-node/test/basics.test.ts @@ -1,7 +1,8 @@ +import http from 'http'; import { test, describe, expect, beforeAll, afterAll } from 'vitest'; import { HttpMethod, Impit, Browser } from '../index.wrapper.js'; -import type { Server } from 'net'; +import type { AddressInfo, Server } from 'net'; import { routes, runProxyServer, runServer } from './mock.server.js'; import { CookieJar } from 'tough-cookie'; @@ -164,6 +165,28 @@ describe.each([ expect(json).toHaveProperty('origin'); }); + test.only('proxy with incomplete authentication works', async () => { + let proxyHit = false; + const proxy = http.createServer((req, res) => { + proxyHit = true; + res.writeHead(200); + res.end('OK'); + }); + await new Promise((r) => proxy.listen(0, '127.0.0.1', r)); + const proxyPort = (proxy.address() as AddressInfo)?.port; + + const impit = new Impit({ + proxyUrl: `http://user:@127.0.0.1:${proxyPort}`, + }); + + const resp = await impit.fetch(getHttpBinUrl('/get')); + expect(await resp.text()).toBe('OK'); + + proxy.close(); + }); + + + test('impit accepts custom cookie jars', async (t) => { const cookieJar = new CookieJar(); cookieJar.setCookieSync('preset-cookie=123; Path=/', getHttpBinUrl('/cookies/')); diff --git a/impit-python/Cargo.toml b/impit-python/Cargo.toml index 446bbdc6..6ddcde93 100644 --- a/impit-python/Cargo.toml +++ b/impit-python/Cargo.toml @@ -12,7 +12,7 @@ impit = { path="../impit" } rustls = { version="0.23.16" } tokio = { version="1.41.1", features = ["full"] } h2 = "0.4.7" -reqwest = "0.12.9" +reqwest = { rev="74e6f84152a48f00106fe72e0bd2cfc1a4254c93", git="https://github.com/seanmonstar/reqwest" } tokio-stream = "0.1.17" bytes = "1.9.0" pyo3 = { version = "0.27", features = ["extension-module", "auto-initialize"] } diff --git a/impit/Cargo.toml b/impit/Cargo.toml index 8219df2e..7fd19bec 100644 --- a/impit/Cargo.toml +++ b/impit/Cargo.toml @@ -12,7 +12,7 @@ hickory-proto = "0.25.1" log = "0.4.22" mime = "0.3.17" num-bigint = "0.4.6" -reqwest = { version = "0.12.9", features = ["json", "gzip", "brotli", "zstd", "deflate", "rustls-tls", "http3", "cookies", "stream", "socks"] } +reqwest = { rev="74e6f84152a48f00106fe72e0bd2cfc1a4254c93", git="https://github.com/seanmonstar/reqwest", features = ["json", "gzip", "brotli", "zstd", "deflate", "rustls-tls", "http3", "cookies", "stream", "socks"] } rustls = { version="0.23.16", features=["impit"] } scraper = "0.24.0" thiserror = "2.0.12" From 58b04f647dc11a72fd620599aa8435116dc8b15b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jind=C5=99ich=20B=C3=A4r?= Date: Tue, 2 Dec 2025 10:32:59 +0100 Subject: [PATCH 2/7] chore: run all tests --- impit-node/test/basics.test.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/impit-node/test/basics.test.ts b/impit-node/test/basics.test.ts index 2b49d22f..e7a93bcd 100644 --- a/impit-node/test/basics.test.ts +++ b/impit-node/test/basics.test.ts @@ -165,7 +165,7 @@ describe.each([ expect(json).toHaveProperty('origin'); }); - test.only('proxy with incomplete authentication works', async () => { + test('proxy with incomplete authentication works', async () => { let proxyHit = false; const proxy = http.createServer((req, res) => { proxyHit = true; @@ -185,8 +185,6 @@ describe.each([ proxy.close(); }); - - test('impit accepts custom cookie jars', async (t) => { const cookieJar = new CookieJar(); cookieJar.setCookieSync('preset-cookie=123; Path=/', getHttpBinUrl('/cookies/')); From 0a7be242ff21a27b8acce05940b1b1ddfe4f320b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jind=C5=99ich=20B=C3=A4r?= Date: Tue, 2 Dec 2025 10:35:50 +0100 Subject: [PATCH 3/7] chore: (temporarily) speed up CI tests --- .github/workflows/node-test.yaml | 304 ++++++++++++++++--------------- 1 file changed, 157 insertions(+), 147 deletions(-) diff --git a/.github/workflows/node-test.yaml b/.github/workflows/node-test.yaml index 37d4e1fd..b3055cbc 100644 --- a/.github/workflows/node-test.yaml +++ b/.github/workflows/node-test.yaml @@ -23,150 +23,150 @@ permissions: workflow_call: jobs: - build: - defaults: - run: - working-directory: impit-node - strategy: - fail-fast: false - matrix: - settings: - - host: macos-latest - target: x86_64-apple-darwin - build: yarn --cwd impit-node build --target x86_64-apple-darwin - - host: windows-latest - build: yarn --cwd impit-node build --target x86_64-pc-windows-msvc - target: x86_64-pc-windows-msvc - - host: ubuntu-22.04 - target: x86_64-unknown-linux-gnu - build: yarn --cwd impit-node build --target x86_64-unknown-linux-gnu --use-napi-cross - - host: ubuntu-24.04-arm - 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 && - yarn --cwd impit-node build - - host: ubuntu-22.04-arm - target: aarch64-unknown-linux-gnu - build: yarn --cwd impit-node build --target aarch64-unknown-linux-gnu --use-napi-cross - - host: ubuntu-latest - target: x86_64-unknown-linux-musl - 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 && - yarn --cwd impit-node build --target x86_64-unknown-linux-musl - - host: macos-latest - target: aarch64-apple-darwin - build: yarn --cwd impit-node build --target aarch64-apple-darwin - - host: windows-latest - target: aarch64-pc-windows-msvc - build: yarn --cwd impit-node build --target aarch64-pc-windows-msvc - name: stable - ${{ matrix.settings.target }} - node@22 - runs-on: ${{ matrix.settings.host }} - steps: - - uses: actions/checkout@v6 + # build: + # defaults: + # run: + # working-directory: impit-node + # strategy: + # fail-fast: false + # matrix: + # settings: + # - host: macos-latest + # target: x86_64-apple-darwin + # build: yarn --cwd impit-node build --target x86_64-apple-darwin + # - host: windows-latest + # build: yarn --cwd impit-node build --target x86_64-pc-windows-msvc + # target: x86_64-pc-windows-msvc + # - host: ubuntu-22.04 + # target: x86_64-unknown-linux-gnu + # build: yarn --cwd impit-node build --target x86_64-unknown-linux-gnu --use-napi-cross + # - host: ubuntu-24.04-arm + # 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 && + # yarn --cwd impit-node build + # - host: ubuntu-22.04-arm + # target: aarch64-unknown-linux-gnu + # build: yarn --cwd impit-node build --target aarch64-unknown-linux-gnu --use-napi-cross + # - host: ubuntu-latest + # target: x86_64-unknown-linux-musl + # 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 && + # yarn --cwd impit-node build --target x86_64-unknown-linux-musl + # - host: macos-latest + # target: aarch64-apple-darwin + # build: yarn --cwd impit-node build --target aarch64-apple-darwin + # - host: windows-latest + # target: aarch64-pc-windows-msvc + # build: yarn --cwd impit-node build --target aarch64-pc-windows-msvc + # name: stable - ${{ matrix.settings.target }} - node@22 + # runs-on: ${{ matrix.settings.host }} + # steps: + # - uses: actions/checkout@v6 - - name: Use Node.js 20 - uses: actions/setup-node@v6 - with: - node-version: 24 + # - name: Use Node.js 20 + # uses: actions/setup-node@v6 + # with: + # node-version: 24 - - name: Enable Corepack - run: | - corepack enable - corepack prepare yarn@stable --activate + # - name: Enable Corepack + # run: | + # corepack enable + # corepack prepare yarn@stable --activate - - name: Activate cache for Node.js 20 - uses: actions/setup-node@v6 - if: ${{ matrix.settings.target != 'x86_64-unknown-linux-musl' }} - with: - node-version: 24 - cache: yarn - cache-dependency-path: impit-node/yarn.lock - - name: Install - uses: dtolnay/rust-toolchain@stable - if: ${{ !matrix.settings.docker }} - with: - toolchain: stable - targets: ${{ matrix.settings.target }} - - name: Cache cargo - uses: actions/cache@v4 - with: - path: | - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - .cargo-cache - target/ - key: ${{ matrix.settings.target }}-cargo-${{ matrix.settings.host }} - - uses: goto-bus-stop/setup-zig@v2 - if: ${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' || matrix.settings.target == 'armv7-unknown-linux-musleabihf' }} - with: - version: 0.13.0 - - name: Setup toolchain - run: ${{ matrix.settings.setup }} - if: ${{ matrix.settings.setup }} - shell: bash - - name: Setup node x86 - if: matrix.settings.target == 'i686-pc-windows-msvc' - run: yarn --cwd impit-node config set supportedArchitectures.cpu "ia32" - shell: bash - - name: Install dependencies - run: yarn --cwd impit-node install - - name: Setup node x86 - uses: actions/setup-node@v6 - if: matrix.settings.target == 'i686-pc-windows-msvc' - with: - node-version: 24 - cache: yarn - cache-dependency-path: impit-node/yarn.lock - architecture: x86 - - name: Build in docker - uses: addnab/docker-run-action@v3 - if: ${{ matrix.settings.docker }} - with: - image: ${{ matrix.settings.docker }} - options: '--user 0:0 -v ${{ github.workspace }}/.cargo-cache/git/db:/usr/local/cargo/git/db -v ${{ github.workspace }}/.cargo/registry/cache:/usr/local/cargo/registry/cache -v ${{ github.workspace }}/.cargo/registry/index:/usr/local/cargo/registry/index -v ${{ github.workspace }}:/build -w /build' - run: ${{ matrix.settings.build }} - - name: Build - run: ${{ matrix.settings.build }} - if: ${{ !matrix.settings.docker }} - shell: bash - - name: Upload artifact - uses: actions/upload-artifact@v5 - with: - name: bindings-${{ matrix.settings.target }} - path: impit-node/${{ env.APP_NAME }}.*.node - if-no-files-found: error + # - name: Activate cache for Node.js 20 + # uses: actions/setup-node@v6 + # if: ${{ matrix.settings.target != 'x86_64-unknown-linux-musl' }} + # with: + # node-version: 24 + # cache: yarn + # cache-dependency-path: impit-node/yarn.lock + # - name: Install + # uses: dtolnay/rust-toolchain@stable + # if: ${{ !matrix.settings.docker }} + # with: + # toolchain: stable + # targets: ${{ matrix.settings.target }} + # - name: Cache cargo + # uses: actions/cache@v4 + # with: + # path: | + # ~/.cargo/registry/index/ + # ~/.cargo/registry/cache/ + # ~/.cargo/git/db/ + # .cargo-cache + # target/ + # key: ${{ matrix.settings.target }}-cargo-${{ matrix.settings.host }} + # - uses: goto-bus-stop/setup-zig@v2 + # if: ${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' || matrix.settings.target == 'armv7-unknown-linux-musleabihf' }} + # with: + # version: 0.13.0 + # - name: Setup toolchain + # run: ${{ matrix.settings.setup }} + # if: ${{ matrix.settings.setup }} + # shell: bash + # - name: Setup node x86 + # if: matrix.settings.target == 'i686-pc-windows-msvc' + # run: yarn --cwd impit-node config set supportedArchitectures.cpu "ia32" + # shell: bash + # - name: Install dependencies + # run: yarn --cwd impit-node install + # - name: Setup node x86 + # uses: actions/setup-node@v6 + # if: matrix.settings.target == 'i686-pc-windows-msvc' + # with: + # node-version: 24 + # cache: yarn + # cache-dependency-path: impit-node/yarn.lock + # architecture: x86 + # - name: Build in docker + # uses: addnab/docker-run-action@v3 + # if: ${{ matrix.settings.docker }} + # with: + # image: ${{ matrix.settings.docker }} + # options: '--user 0:0 -v ${{ github.workspace }}/.cargo-cache/git/db:/usr/local/cargo/git/db -v ${{ github.workspace }}/.cargo/registry/cache:/usr/local/cargo/registry/cache -v ${{ github.workspace }}/.cargo/registry/index:/usr/local/cargo/registry/index -v ${{ github.workspace }}:/build -w /build' + # run: ${{ matrix.settings.build }} + # - name: Build + # run: ${{ matrix.settings.build }} + # if: ${{ !matrix.settings.docker }} + # shell: bash + # - name: Upload artifact + # uses: actions/upload-artifact@v5 + # with: + # name: bindings-${{ matrix.settings.target }} + # path: impit-node/${{ env.APP_NAME }}.*.node + # if-no-files-found: error test-macOS-windows-binding: name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }} - needs: - - build + # needs: + # - build strategy: fail-fast: false matrix: @@ -203,6 +203,8 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v6 with: + run-id: 19853556854 + github-token: ${{ secrets.GITHUB_TOKEN }} name: bindings-${{ matrix.settings.target }} path: impit-node - name: List packages @@ -214,8 +216,8 @@ jobs: run: yarn --cwd impit-node test test-linux-x64-gnu-binding: name: Test bindings on Linux-x64-gnu - node@${{ matrix.node }} - needs: - - build + # needs: + # - build strategy: fail-fast: false matrix: @@ -245,6 +247,8 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v6 with: + run-id: 19853556854 + github-token: ${{ secrets.GITHUB_TOKEN }} name: bindings-x86_64-unknown-linux-gnu path: impit-node - name: List packages @@ -255,8 +259,8 @@ jobs: test-linux-aarch64-gnu-binding: name: Test bindings on Linux-aarch64-gnu - node@${{ matrix.node }} - needs: - - build + # needs: + # - build strategy: fail-fast: false matrix: @@ -287,6 +291,8 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v6 with: + run-id: 19853556854 + github-token: ${{ secrets.GITHUB_TOKEN }} name: bindings-aarch64-unknown-linux-gnu path: impit-node - name: List packages @@ -299,8 +305,8 @@ jobs: test-linux-aarch64-musl-binding: name: Test bindings on Linux-aarch64-musl - node@${{ matrix.node }} - needs: - - build + # needs: + # - build strategy: fail-fast: false matrix: @@ -329,6 +335,8 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v6 with: + run-id: 19853556854 + github-token: ${{ secrets.GITHUB_TOKEN }} name: bindings-aarch64-unknown-linux-musl path: impit-node - name: List packages @@ -340,8 +348,8 @@ jobs: test-linux-x64-musl-binding: name: Test bindings on x86_64-unknown-linux-musl - node@${{ matrix.node }} - needs: - - build + # needs: + # - build strategy: fail-fast: false matrix: @@ -370,6 +378,8 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v6 with: + run-id: 19853556854 + github-token: ${{ secrets.GITHUB_TOKEN }} name: bindings-x86_64-unknown-linux-musl path: impit-node - name: List packages From 8de808f9c2b4eb3dafb376c81d9bdb7b4162aca5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jind=C5=99ich=20B=C3=A4r?= Date: Tue, 2 Dec 2025 15:13:12 +0100 Subject: [PATCH 4/7] chore: update `hyper-util` --- Cargo.lock | 93 +++++++++++++++++++++++++++++++++++++++++++----- impit/Cargo.toml | 2 +- 2 files changed, 86 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 20571602..ef30da4d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1282,9 +1282,9 @@ checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "hyper" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" dependencies = [ "atomic-waker", "bytes", @@ -1337,9 +1337,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.16" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" +checksum = "52e9a2a24dc5c6821e71a7030e1e14b7b632acac55c40e9d2e082c621261bb56" dependencies = [ "base64", "bytes", @@ -1480,7 +1480,7 @@ dependencies = [ "log", "mime", "num-bigint", - "reqwest", + "reqwest 0.12.24", "rustls", "scraper", "thiserror", @@ -1511,7 +1511,7 @@ dependencies = [ "napi-build", "napi-derive", "openssl", - "reqwest", + "reqwest 0.12.24 (git+https://github.com/seanmonstar/reqwest?branch=master)", "rustls", "tokio", "tokio-stream", @@ -1530,7 +1530,7 @@ dependencies = [ "openssl", "pyo3", "pyo3-async-runtimes", - "reqwest", + "reqwest 0.12.24 (git+https://github.com/seanmonstar/reqwest?rev=74e6f84152a48f00106fe72e0bd2cfc1a4254c93)", "rustls", "tokio", "tokio-stream", @@ -2456,7 +2456,6 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" version = "0.12.24" -source = "git+https://github.com/seanmonstar/reqwest?rev=74e6f84152a48f00106fe72e0bd2cfc1a4254c93#74e6f84152a48f00106fe72e0bd2cfc1a4254c93" dependencies = [ "async-compression", "base64", @@ -2504,6 +2503,84 @@ dependencies = [ "webpki-roots 1.0.2", ] +[[package]] +name = "reqwest" +version = "0.12.24" +source = "git+https://github.com/seanmonstar/reqwest?branch=master#74e6f84152a48f00106fe72e0bd2cfc1a4254c93" +dependencies = [ + "base64", + "bytes", + "encoding_rs", + "futures-core", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-tls", + "hyper-util", + "js-sys", + "log", + "mime", + "native-tls", + "percent-encoding", + "pin-project-lite", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-native-tls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "reqwest" +version = "0.12.24" +source = "git+https://github.com/seanmonstar/reqwest?rev=74e6f84152a48f00106fe72e0bd2cfc1a4254c93#74e6f84152a48f00106fe72e0bd2cfc1a4254c93" +dependencies = [ + "base64", + "bytes", + "encoding_rs", + "futures-core", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-tls", + "hyper-util", + "js-sys", + "log", + "mime", + "native-tls", + "percent-encoding", + "pin-project-lite", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-native-tls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "ring" version = "0.17.14" diff --git a/impit/Cargo.toml b/impit/Cargo.toml index 7fd19bec..86055300 100644 --- a/impit/Cargo.toml +++ b/impit/Cargo.toml @@ -19,5 +19,5 @@ thiserror = "2.0.12" tokio = { version="1.40.0", features = ["full"] } url = "2.5.2" webpki-roots = "0.26.6" -hyper-util = "0.1.16" +hyper-util = "0.1.18" hyper = "1.7.0" From 31823fa0d4529fb3537320a669b4ee9a3b1cc8d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jind=C5=99ich=20B=C3=A4r?= Date: Tue, 2 Dec 2025 15:13:29 +0100 Subject: [PATCH 5/7] Revert "chore: (temporarily) speed up CI tests" This reverts commit 0a7be242ff21a27b8acce05940b1b1ddfe4f320b. --- .github/workflows/node-test.yaml | 304 +++++++++++++++---------------- 1 file changed, 147 insertions(+), 157 deletions(-) diff --git a/.github/workflows/node-test.yaml b/.github/workflows/node-test.yaml index b3055cbc..37d4e1fd 100644 --- a/.github/workflows/node-test.yaml +++ b/.github/workflows/node-test.yaml @@ -23,150 +23,150 @@ permissions: workflow_call: jobs: - # build: - # defaults: - # run: - # working-directory: impit-node - # strategy: - # fail-fast: false - # matrix: - # settings: - # - host: macos-latest - # target: x86_64-apple-darwin - # build: yarn --cwd impit-node build --target x86_64-apple-darwin - # - host: windows-latest - # build: yarn --cwd impit-node build --target x86_64-pc-windows-msvc - # target: x86_64-pc-windows-msvc - # - host: ubuntu-22.04 - # target: x86_64-unknown-linux-gnu - # build: yarn --cwd impit-node build --target x86_64-unknown-linux-gnu --use-napi-cross - # - host: ubuntu-24.04-arm - # 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 && - # yarn --cwd impit-node build - # - host: ubuntu-22.04-arm - # target: aarch64-unknown-linux-gnu - # build: yarn --cwd impit-node build --target aarch64-unknown-linux-gnu --use-napi-cross - # - host: ubuntu-latest - # target: x86_64-unknown-linux-musl - # 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 && - # yarn --cwd impit-node build --target x86_64-unknown-linux-musl - # - host: macos-latest - # target: aarch64-apple-darwin - # build: yarn --cwd impit-node build --target aarch64-apple-darwin - # - host: windows-latest - # target: aarch64-pc-windows-msvc - # build: yarn --cwd impit-node build --target aarch64-pc-windows-msvc - # name: stable - ${{ matrix.settings.target }} - node@22 - # runs-on: ${{ matrix.settings.host }} - # steps: - # - uses: actions/checkout@v6 + build: + defaults: + run: + working-directory: impit-node + strategy: + fail-fast: false + matrix: + settings: + - host: macos-latest + target: x86_64-apple-darwin + build: yarn --cwd impit-node build --target x86_64-apple-darwin + - host: windows-latest + build: yarn --cwd impit-node build --target x86_64-pc-windows-msvc + target: x86_64-pc-windows-msvc + - host: ubuntu-22.04 + target: x86_64-unknown-linux-gnu + build: yarn --cwd impit-node build --target x86_64-unknown-linux-gnu --use-napi-cross + - host: ubuntu-24.04-arm + 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 && + yarn --cwd impit-node build + - host: ubuntu-22.04-arm + target: aarch64-unknown-linux-gnu + build: yarn --cwd impit-node build --target aarch64-unknown-linux-gnu --use-napi-cross + - host: ubuntu-latest + target: x86_64-unknown-linux-musl + 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 && + yarn --cwd impit-node build --target x86_64-unknown-linux-musl + - host: macos-latest + target: aarch64-apple-darwin + build: yarn --cwd impit-node build --target aarch64-apple-darwin + - host: windows-latest + target: aarch64-pc-windows-msvc + build: yarn --cwd impit-node build --target aarch64-pc-windows-msvc + name: stable - ${{ matrix.settings.target }} - node@22 + runs-on: ${{ matrix.settings.host }} + steps: + - uses: actions/checkout@v6 - # - name: Use Node.js 20 - # uses: actions/setup-node@v6 - # with: - # node-version: 24 + - name: Use Node.js 20 + uses: actions/setup-node@v6 + with: + node-version: 24 - # - name: Enable Corepack - # run: | - # corepack enable - # corepack prepare yarn@stable --activate + - name: Enable Corepack + run: | + corepack enable + corepack prepare yarn@stable --activate - # - name: Activate cache for Node.js 20 - # uses: actions/setup-node@v6 - # if: ${{ matrix.settings.target != 'x86_64-unknown-linux-musl' }} - # with: - # node-version: 24 - # cache: yarn - # cache-dependency-path: impit-node/yarn.lock - # - name: Install - # uses: dtolnay/rust-toolchain@stable - # if: ${{ !matrix.settings.docker }} - # with: - # toolchain: stable - # targets: ${{ matrix.settings.target }} - # - name: Cache cargo - # uses: actions/cache@v4 - # with: - # path: | - # ~/.cargo/registry/index/ - # ~/.cargo/registry/cache/ - # ~/.cargo/git/db/ - # .cargo-cache - # target/ - # key: ${{ matrix.settings.target }}-cargo-${{ matrix.settings.host }} - # - uses: goto-bus-stop/setup-zig@v2 - # if: ${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' || matrix.settings.target == 'armv7-unknown-linux-musleabihf' }} - # with: - # version: 0.13.0 - # - name: Setup toolchain - # run: ${{ matrix.settings.setup }} - # if: ${{ matrix.settings.setup }} - # shell: bash - # - name: Setup node x86 - # if: matrix.settings.target == 'i686-pc-windows-msvc' - # run: yarn --cwd impit-node config set supportedArchitectures.cpu "ia32" - # shell: bash - # - name: Install dependencies - # run: yarn --cwd impit-node install - # - name: Setup node x86 - # uses: actions/setup-node@v6 - # if: matrix.settings.target == 'i686-pc-windows-msvc' - # with: - # node-version: 24 - # cache: yarn - # cache-dependency-path: impit-node/yarn.lock - # architecture: x86 - # - name: Build in docker - # uses: addnab/docker-run-action@v3 - # if: ${{ matrix.settings.docker }} - # with: - # image: ${{ matrix.settings.docker }} - # options: '--user 0:0 -v ${{ github.workspace }}/.cargo-cache/git/db:/usr/local/cargo/git/db -v ${{ github.workspace }}/.cargo/registry/cache:/usr/local/cargo/registry/cache -v ${{ github.workspace }}/.cargo/registry/index:/usr/local/cargo/registry/index -v ${{ github.workspace }}:/build -w /build' - # run: ${{ matrix.settings.build }} - # - name: Build - # run: ${{ matrix.settings.build }} - # if: ${{ !matrix.settings.docker }} - # shell: bash - # - name: Upload artifact - # uses: actions/upload-artifact@v5 - # with: - # name: bindings-${{ matrix.settings.target }} - # path: impit-node/${{ env.APP_NAME }}.*.node - # if-no-files-found: error + - name: Activate cache for Node.js 20 + uses: actions/setup-node@v6 + if: ${{ matrix.settings.target != 'x86_64-unknown-linux-musl' }} + with: + node-version: 24 + cache: yarn + cache-dependency-path: impit-node/yarn.lock + - name: Install + uses: dtolnay/rust-toolchain@stable + if: ${{ !matrix.settings.docker }} + with: + toolchain: stable + targets: ${{ matrix.settings.target }} + - name: Cache cargo + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + .cargo-cache + target/ + key: ${{ matrix.settings.target }}-cargo-${{ matrix.settings.host }} + - uses: goto-bus-stop/setup-zig@v2 + if: ${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' || matrix.settings.target == 'armv7-unknown-linux-musleabihf' }} + with: + version: 0.13.0 + - name: Setup toolchain + run: ${{ matrix.settings.setup }} + if: ${{ matrix.settings.setup }} + shell: bash + - name: Setup node x86 + if: matrix.settings.target == 'i686-pc-windows-msvc' + run: yarn --cwd impit-node config set supportedArchitectures.cpu "ia32" + shell: bash + - name: Install dependencies + run: yarn --cwd impit-node install + - name: Setup node x86 + uses: actions/setup-node@v6 + if: matrix.settings.target == 'i686-pc-windows-msvc' + with: + node-version: 24 + cache: yarn + cache-dependency-path: impit-node/yarn.lock + architecture: x86 + - name: Build in docker + uses: addnab/docker-run-action@v3 + if: ${{ matrix.settings.docker }} + with: + image: ${{ matrix.settings.docker }} + options: '--user 0:0 -v ${{ github.workspace }}/.cargo-cache/git/db:/usr/local/cargo/git/db -v ${{ github.workspace }}/.cargo/registry/cache:/usr/local/cargo/registry/cache -v ${{ github.workspace }}/.cargo/registry/index:/usr/local/cargo/registry/index -v ${{ github.workspace }}:/build -w /build' + run: ${{ matrix.settings.build }} + - name: Build + run: ${{ matrix.settings.build }} + if: ${{ !matrix.settings.docker }} + shell: bash + - name: Upload artifact + uses: actions/upload-artifact@v5 + with: + name: bindings-${{ matrix.settings.target }} + path: impit-node/${{ env.APP_NAME }}.*.node + if-no-files-found: error test-macOS-windows-binding: name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }} - # needs: - # - build + needs: + - build strategy: fail-fast: false matrix: @@ -203,8 +203,6 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v6 with: - run-id: 19853556854 - github-token: ${{ secrets.GITHUB_TOKEN }} name: bindings-${{ matrix.settings.target }} path: impit-node - name: List packages @@ -216,8 +214,8 @@ jobs: run: yarn --cwd impit-node test test-linux-x64-gnu-binding: name: Test bindings on Linux-x64-gnu - node@${{ matrix.node }} - # needs: - # - build + needs: + - build strategy: fail-fast: false matrix: @@ -247,8 +245,6 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v6 with: - run-id: 19853556854 - github-token: ${{ secrets.GITHUB_TOKEN }} name: bindings-x86_64-unknown-linux-gnu path: impit-node - name: List packages @@ -259,8 +255,8 @@ jobs: test-linux-aarch64-gnu-binding: name: Test bindings on Linux-aarch64-gnu - node@${{ matrix.node }} - # needs: - # - build + needs: + - build strategy: fail-fast: false matrix: @@ -291,8 +287,6 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v6 with: - run-id: 19853556854 - github-token: ${{ secrets.GITHUB_TOKEN }} name: bindings-aarch64-unknown-linux-gnu path: impit-node - name: List packages @@ -305,8 +299,8 @@ jobs: test-linux-aarch64-musl-binding: name: Test bindings on Linux-aarch64-musl - node@${{ matrix.node }} - # needs: - # - build + needs: + - build strategy: fail-fast: false matrix: @@ -335,8 +329,6 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v6 with: - run-id: 19853556854 - github-token: ${{ secrets.GITHUB_TOKEN }} name: bindings-aarch64-unknown-linux-musl path: impit-node - name: List packages @@ -348,8 +340,8 @@ jobs: test-linux-x64-musl-binding: name: Test bindings on x86_64-unknown-linux-musl - node@${{ matrix.node }} - # needs: - # - build + needs: + - build strategy: fail-fast: false matrix: @@ -378,8 +370,6 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v6 with: - run-id: 19853556854 - github-token: ${{ secrets.GITHUB_TOKEN }} name: bindings-x86_64-unknown-linux-musl path: impit-node - name: List packages From 62d0333da8b20f12a4dc87a891779159562dc8c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jind=C5=99ich=20B=C3=A4r?= Date: Tue, 2 Dec 2025 15:14:33 +0100 Subject: [PATCH 6/7] chore: regenerate lockfile --- Cargo.lock | 85 +++--------------------------------------------------- 1 file changed, 4 insertions(+), 81 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ef30da4d..8538b171 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1480,7 +1480,7 @@ dependencies = [ "log", "mime", "num-bigint", - "reqwest 0.12.24", + "reqwest", "rustls", "scraper", "thiserror", @@ -1511,7 +1511,7 @@ dependencies = [ "napi-build", "napi-derive", "openssl", - "reqwest 0.12.24 (git+https://github.com/seanmonstar/reqwest?branch=master)", + "reqwest", "rustls", "tokio", "tokio-stream", @@ -1530,7 +1530,7 @@ dependencies = [ "openssl", "pyo3", "pyo3-async-runtimes", - "reqwest 0.12.24 (git+https://github.com/seanmonstar/reqwest?rev=74e6f84152a48f00106fe72e0bd2cfc1a4254c93)", + "reqwest", "rustls", "tokio", "tokio-stream", @@ -2456,6 +2456,7 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" version = "0.12.24" +source = "git+https://github.com/seanmonstar/reqwest?rev=74e6f84152a48f00106fe72e0bd2cfc1a4254c93#74e6f84152a48f00106fe72e0bd2cfc1a4254c93" dependencies = [ "async-compression", "base64", @@ -2503,84 +2504,6 @@ dependencies = [ "webpki-roots 1.0.2", ] -[[package]] -name = "reqwest" -version = "0.12.24" -source = "git+https://github.com/seanmonstar/reqwest?branch=master#74e6f84152a48f00106fe72e0bd2cfc1a4254c93" -dependencies = [ - "base64", - "bytes", - "encoding_rs", - "futures-core", - "h2", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-rustls", - "hyper-tls", - "hyper-util", - "js-sys", - "log", - "mime", - "native-tls", - "percent-encoding", - "pin-project-lite", - "rustls-pki-types", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "tokio", - "tokio-native-tls", - "tower", - "tower-http", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "reqwest" -version = "0.12.24" -source = "git+https://github.com/seanmonstar/reqwest?rev=74e6f84152a48f00106fe72e0bd2cfc1a4254c93#74e6f84152a48f00106fe72e0bd2cfc1a4254c93" -dependencies = [ - "base64", - "bytes", - "encoding_rs", - "futures-core", - "h2", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-rustls", - "hyper-tls", - "hyper-util", - "js-sys", - "log", - "mime", - "native-tls", - "percent-encoding", - "pin-project-lite", - "rustls-pki-types", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "tokio", - "tokio-native-tls", - "tower", - "tower-http", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "ring" version = "0.17.14" From 34b8bac2520a9cf67333f1071e286c557b8c67e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jind=C5=99ich=20B=C3=A4r?= Date: Tue, 2 Dec 2025 15:29:56 +0100 Subject: [PATCH 7/7] chore: fix proxy test --- impit-node/test/basics.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/impit-node/test/basics.test.ts b/impit-node/test/basics.test.ts index e7a93bcd..504aaf46 100644 --- a/impit-node/test/basics.test.ts +++ b/impit-node/test/basics.test.ts @@ -179,8 +179,9 @@ describe.each([ proxyUrl: `http://user:@127.0.0.1:${proxyPort}`, }); - const resp = await impit.fetch(getHttpBinUrl('/get')); + const resp = await impit.fetch('http://example.com/'); // the URL doesn't matter, request should go through the proxy expect(await resp.text()).toBe('OK'); + expect(proxyHit).toBe(true); proxy.close(); });