Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
A Full-Featured HTTP and WebSocket Proxy for Node.js forked from http-party/node-http-proxy with modern Typescript rewrite.
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 httpProxy.web(req, res, {
target: main.url,
});
} 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.
corepack enable
pnpm install
pnpm dev
Made with 💛
Published under MIT License.
v0.1.5
close
event (#8)FAQs
A full-featured HTTP proxy for Node.js.
The npm package httpxy receives a total of 459,130 weekly downloads. As such, httpxy popularity was classified as popular.
We found that httpxy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.