New:Socket for Asana Is Now Available.Learn more
Get Started

httpxy

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

httpxy

A full-featured HTTP proxy for Node.js.

Source
npmnpm
Version
0.2.2
Version published
Weekly downloads
9.1M
-47%
Maintainers
1
Weekly downloads
 
Created
Source

🔀 httpxy

npm version npm downloads bundle Codecov

A Full-Featured HTTP and WebSocket Proxy for Node.js forked from http-party/node-http-proxy with modern Typescript rewrite.

Usage

Install package:

# npm
npm install httpxy

# yarn
yarn add httpxy

# pnpm
pnpm install httpxy

Create proxy:

import { createServer } from "node:http";

import { createProxyServer } from "httpxy";

const proxy = createProxyServer({});

const server = createServer(async (req, res) => {
  try {
    await proxy.web(req, res, {
      target: address /* address of your proxy server here */,
    });
  } catch (error) {
    console.error(error);
    res.statusCode = 500;
    res.end("Proxy error: " + error.toString());
  }
});

server.listen(3000, () => {
  console.log("Proxy is listening on http://localhost:3000");
});

Checkout http-party/node-http-proxy for more options and examples (note: followRedirects is not supported).

Development

  • Clone this repository
  • Install latest LTS version of Node.js
  • Enable Corepack using corepack enable
  • Install dependencies using pnpm install
  • Run interactive tests using pnpm dev

License

Made with 💛

Published under MIT License.

FAQs

Package last updated on 11 Feb 2026

Related posts