A full-featured, middleware-oriented HTTP/S and WebSocket proxy with traffic replay, load balancing, routing, and retry/backoff. Current stable version is 0.4.16, last updated July 2020. It is built on top of http-proxy and supports both command-line and programmatic usage. Key differentiators include a hierarchical middleware layer, path-based routing with params, concurrent/sequential traffic replay, and connectivity with Connect/Express middleware. Compared to alternatives like http-proxy or http-mitm-proxy, Rocky provides a higher-level abstraction with built-in balancer and retry logic. The project is in maintenance mode; no major releases since 2020.
npm install rockyVerified import paths — ran on the pinned version, not inferred.
Sets up a simple HTTP proxy that forwards all traffic to httpbin.org, with middleware hooks for forward and replay phases.
Disable retry or avoid using retry options; consider implementing retry manually.
Use const proxy = require('rocky')() to create an instance.Ensure every middleware function ends with await next() or next() (if not async).
Use rocky() instead of new rocky()
Use forward only for WebSocket; replay not available.
Change to const rocky = require('rocky')Kill the process using the port or choose a different port.
Create an instance: const proxy = require('rocky')()