Skip to content

Releases

v0.5.6

Choose a tag to compare

@pi0x pi0x released this 23 Oct 09:12

compare changes

🚀 Enhancements

  • fetch: Support custom Response constructor (#186)
  • ws: Add upgradeTimeout and resolve ws() on handled socket errors (#172)

🩹 Fixes

  • web-incoming: Pipe request without waiting for socket connect (3e68d30)
  • web-incoming: Defer body piping until socket is assigned (10a916b)
  • Drain client body when upstream responds before request body (#170)
  • ws: Correct non-upgrade response framing (#173)

🏡 Chore

❤️ Contributors

v0.5.5

Choose a tag to compare

@pi0 pi0 released this 09 Jul 11:09

compare changes

🩹 Fixes

  • Retain relative protocol in redirect location header (#156)
  • Force connection: close on chunked upstream requests (#158)

✅ Tests

  • Add regression test to ensure url embed preservation (#155)

❤️ Contributors

v0.5.4

Choose a tag to compare

@pi0 pi0 released this 30 Jun 09:11

compare changes

🩹 Fixes

  • types: Declare pathname on ProxyTargetDetailed (#152)
  • Preserve transfer-encoding on chunked DELETE/OPTIONS (#153)

🤖 CI

  • Add ecosystem test for http-proxy-middleware (#142)

❤️ Contributors

  • Pooya Parsa (@pi0)
  • Armin Kramer (@Rand0mF)

v0.5.3

Choose a tag to compare

@pi0 pi0 released this 20 May 21:10

compare changes

🩹 Fixes

  • utils: Revert trailing slash preservation in joinURL (3b5f8b0)

v0.5.2

Choose a tag to compare

@pi0 pi0 released this 19 May 18:07
5cb386e

compare changes

🚀 Enhancements

  • Derive host from hostname for plain object targets and bracket IPv6 literals (#136)
  • Forward target URL as the 4th argument in error events (#135)

🩹 Fixes

  • Preserve trailing slash when proxying root path to a sub-path target (#137)

❤️ Contributors

v0.5.1

Choose a tag to compare

@pi0 pi0 released this 22 Apr 13:14

compare changes

🚀 Enhancements

  • server: listeningCallback (#127)

🩹 Fixes

  • Use agents: false for ws upgrade (#129)
  • Do not set undefined values for headers (#130)

❤️ Contributors

v0.5.0

Choose a tag to compare

@pi0 pi0 released this 26 Mar 10:35

Special thanks to @mcollina ❤️ Performance optimizations were inspired by analysis of fast-proxy and @fastify/http-proxy.

⚠️ Breaking: Default keep-alive connection pooling

ProxyServer and proxyFetch now use shared http.Agent / https.Agent instances with keepAlive: true (256 max sockets, 64 max free sockets) instead of creating a new socket per request. Set agent: false to restore previous per-request connection behavior.

Performance improvements

  • Default keep-alive agents — Connection reuse via shared agent pools for both ProxyServer and proxyFetch. HTTP/2 incoming requests are excluded to avoid stream lifecycle conflicts.
  • Streaming request bodies in proxyFetch — ReadableStream and Blob bodies are piped directly to upstream instead of buffering in memory. Bodies are still buffered when followRedirects is enabled for 307/308 replay.
  • Single-pass header merge — setupOutgoing merges req.headers and options.headers in one pass instead of two spread operations.
  • Raw header pairs for response — proxyFetch builds response headers from rawHeaders pairs instead of iterating a Headers object.
  • Plain-object header fast path — When init.headers is a plain Record, headers are merged with Object.assign instead of wrapping in Headers.

Bug fixes

  • Fix header merge regression preserving :authority → host override order for HTTP/2
  • Destroy outgoing request on readable body stream error in proxyFetch

Benchmarks

bench/bench.ts -s -d 60s -c 128

Duration: 60s | Connections: 128 | Mode: sequential

GET (no body)

Proxy Req/s Scale Avg P50 P99 Throughput
httpxy.server 19694 1.00x 6µs 5µs 33µs 3.6MB/s
fast-proxy 19664 1.00x 7µs 4µs 38µs 3.6MB/s
@fastify/http-proxy 18957 0.96x 7µs 4µs 44µs 3.5MB/s
httpxy.proxyFetch 15433 0.78x 8µs 6µs 34µs 2.8MB/s
http-proxy-3 13010 0.66x 10µs 10µs 13µs 2.0MB/s
http-proxy 12893 0.65x 10µs 10µs 13µs 2.0MB/s

POST (~1KB JSON)

Proxy Req/s Scale Avg P50 P99 Throughput
httpxy.server 17316 1.00x 7µs 6µs 31µs 20.6MB/s
fast-proxy 15365 0.89x 8µs 5µs 42µs 18.3MB/s
@fastify/http-proxy 15117 0.87x 8µs 5µs 47µs 18.1MB/s
httpxy.proxyFetch 13179 0.76x 10µs 7µs 41µs 15.7MB/s
http-proxy-3 11487 0.66x 11µs 11µs 15µs 13.4MB/s
http-proxy 11052 0.64x 12µs 11µs 14µs 12.9MB/s

v0.4.0

Choose a tag to compare

@pi0 pi0 released this 25 Mar 20:53

compare changes

🚀 Enhancements

  • HTTP/2 listener support (#102)
  • fetch: Add proxyFetch options for timeout, xfwd, changeOrigin, agent, followRedirects, HTTPS, and path merging (efa9711)

🩹 Fixes

  • web-incoming: Close downstream stream when upstream SSE aborts (#103)
  • Handle relative Location URLs in redirect rewriting (#20, #104)
  • web-outgoing: Handle invalid response header characters gracefully (#106)
  • web-incoming: Remove deprecated req.abort() and req.on("aborted") (#107)
  • web-outgoing: Handle object target in redirect host rewrite (#108)
  • web-incoming: Remove deprecated req.on('aborted') listener (#110)
  • ws: Skip writing to closed socket on non-upgrade response (#114)
  • web-incoming: Guard req.socket access in error handler (#112)
  • web-incoming: Defer pipe until socket connects (#111)
  • server: Catch synchronous exceptions in middleware passes (#109)
  • web-incoming: Emit econnreset on client disconnect (#115)
  • ws: Handle response stream errors on failed WS upgrade (#116)
  • web-outgoing: Include HTTP 303 in redirect location rewriting (#119)
  • web-outgoing: Skip empty header names (#121)
  • ssl: Prevent undefined target values from overwriting ssl options (#118)
  • utils: Preserve target URL query string in path merging (#117)
  • middleware: Do not append duplicate x-forwarded-* header values (#120)
  • web-outgoing: Strip transfer-encoding on 204/304 (#122)
  • web-incoming: Use isSSL regex for consistent https/wss protocol checks (#123)
  • ws: Preserve wss:// protocol and fix error handling in proxyUpgrade (cb01605)

📦 Build

❤️ Contributors

v0.3.1

Choose a tag to compare

@pi0 pi0 released this 18 Feb 19:15

compare changes

🚀 Enhancements

  • Standalone proxyUpgrade util (#100) (docs)

v0.3.0

Choose a tag to compare

@pi0 pi0 released this 12 Feb 22:54

compare changes

🚀 Enhancements

  • proxyFetch (#98) (docs)
  • web-incoming: Implement native followRedirects support (d3d7f39)

🩹 Fixes

  • proxy: Ensure leading slash on toProxy outgoing path (7759c94)
  • server: Emit proxy error when listener exists, reject only when unhandled (c9d2c51)
  • web-incoming: Destroy request socket on timeout (40105be)
  • utils: Preserve multiple consecutive slashes in request URL (18e4d0d)
  • web-incoming: Abort proxy request when client disconnects (a5d4996)
  • ws: Handle client socket errors before upstream upgrade (aebb5c6)

💅 Refactors

  • Remove legacy node Url support (b2e6c92)

🏡 Chore

  • Enable strict typescript with nodenext resolution (0c147a3)

✅ Tests

🤖 CI