# testcafe-hammerhead

> A powerful web-proxy used as a core for the TestCafe testing framework (https://github.com/DevExpress/testcafe).

Latest version **31.7.8** (published 2026-05-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install testcafe-hammerhead
pnpm add testcafe-hammerhead
yarn add testcafe-hammerhead
bun add testcafe-hammerhead
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; no vulnerabilities; has provenance; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 31.7.8 |
| Published | 2026-05-20 |
| First published | 2015-09-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=20.0.0 |
| Dependencies | 25 |
| Unpacked size | 3 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 179 |
| Author | Developer Express Inc. |
| Maintainers | romanresh |

## Links

- npm: https://www.npmjs.com/package/testcafe-hammerhead
- Repository: https://github.com/DevExpress/testcafe-hammerhead
- Issues: https://github.com/DevExpress/testcafe-hammerhead/issues
- npm.io page: https://npm.io/package/testcafe-hammerhead

## Dependencies (25)

- [ws](https://npm.io/package/ws.md) ^7.4.6
- [mime](https://npm.io/package/mime.md) ~1.4.1
- [debug](https://npm.io/package/debug.md) 4.3.1
- [bowser](https://npm.io/package/bowser.md) 1.6.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [nanoid](https://npm.io/package/nanoid.md) ^3.1.12
- [parse5](https://npm.io/package/parse5.md) ^7.1.2
- [pinkie](https://npm.io/package/pinkie.md) 2.0.4
- [semver](https://npm.io/package/semver.md) 7.5.3
- [mustache](https://npm.io/package/mustache.md) ^2.1.1
- [lru-cache](https://npm.io/package/lru-cache.md) 11.0.2
- [os-family](https://npm.io/package/os-family.md) ^1.0.0
- [crypto-md5](https://npm.io/package/crypto-md5.md) ^1.0.0
- [iconv-lite](https://npm.io/package/iconv-lite.md) 0.5.1
- [merge-stream](https://npm.io/package/merge-stream.md) ^1.0.1
- [tough-cookie](https://npm.io/package/tough-cookie.md) 4.1.3
- [tunnel-agent](https://npm.io/package/tunnel-agent.md) 0.6.0
- [@electron/asar](https://npm.io/package/@electron/asar.md) ^3.2.3
- [@node-ntlm/core](https://npm.io/package/@node-ntlm/core.md) ^0.3.2
- [@adobe/css-tools](https://npm.io/package/@adobe/css-tools.md) ^4.3.0-rc.1
- [acorn-hammerhead](https://npm.io/package/acorn-hammerhead.md) 0.6.2
- [esotope-hammerhead](https://npm.io/package/esotope-hammerhead.md) 0.6.9
- [match-url-wildcard](https://npm.io/package/match-url-wildcard.md) 0.0.4
- [read-file-relative](https://npm.io/package/read-file-relative.md) ^1.2.0
- [http-cache-semantics](https://npm.io/package/http-cache-semantics.md) ^4.1.0

## Recent versions

- 31.7.8 (latest) — 2026-05-20
- 31.7.7 — 2026-01-15
- 31.7.6 — 2025-12-03
- 31.7.5 — 2025-02-12
- 31.7.4 — 2024-11-06
- 31.7.3 — 2024-09-03
- 31.7.2 — 2024-05-29
- 31.7.1 — 2023-12-28
- 31.7.0 — 2023-12-18
- 31.6.4 — 2023-11-16
- 31.6.3 — 2023-10-30
- 31.6.2 — 2023-09-12
- 31.6.1 — 2023-08-18
- 31.5.0 — 2023-08-14
- 31.4.15 — 2023-08-10
- … 339 more at https://npm.io/package/testcafe-hammerhead/versions

## README

# testcafe-hammerhead
`testcafe-hammerhead` is a powerful Web proxy used as a core for the [TestCafe](https://github.com/devexpress/testcafe) testing framework.

## Core Concepts

`testcafe-hammerhead` is a URL-rewriting proxy. This means that it rewrites all properties of the appropriate JavaScript objects that contain a URL value (`Location`, `HTMLLinkElement.href`, etc). You can see it if you open a proxied page, invoke the browser's DevTools and inspect any element.

In addition, the proxied web page does not know that it is opened under a proxy. The proxy intercepts access attempts to all URL-containing properties and provides the original values.

## First Look
1. Clone the Hammerhead repository
    ```cmd
    git clone https://github.com/DevExpress/testcafe-hammerhead.git
    ```
1. Go to the `testcafe-hammerhead` folder
    ```cmd
    cd testcafe-hammerhead
    ```
1. Install the dependencies
    ```cmd
    npm install
    ```
1. Run the [Hammerhead playground](https://github.com/DevExpress/testcafe-hammerhead/blob/master/test/playground/server.js) to see our proxy in action
    ```cmd
    node node_modules/gulp/bin/gulp http-playground
    ```

This opens a playground page where you can specify a webpage to proxy. Enter the page URL and hit **Proxy!**.

## Features

* HTTP/HTTPS requests
* WebSockets, EventSource
* file upload
* request events (`onRequest`, `onResponse`)
* bypassing requests
* custom UI on a web page

##  Reporting Issues and Contributing

Read our [Contributing Guide](https://github.com/DevExpress/testcafe-hammerhead/blob/master/CONTRIBUTING.md) to learn how to contribute to the project.

[![Build Status](https://img.shields.io/github/checks-status/DevExpress/testcafe-hammerhead/master?label=Tests)](https://github.com/DevExpress/testcafe-hammerhead/commits/master)

[![Sauce Test Status](https://saucelabs.com/browser-matrix/testcafebot.svg)](https://saucelabs.com/u/testcafebot)

---
_Source: https://npm.io/package/testcafe-hammerhead · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
