You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,12 @@
2
2
3
3
[](https://github.com/sagemathinc/http-proxy-3/actions/workflows/test.yml)
4
4
5
-
**THIS IS FULLY READY TO USE IN PRODUCTION. Please use it!**
5
+
**THIS IS MAINTAINED AND READY TO USE IN PRODUCTION. Please use it!**
6
+
7
+
- Used in production by:
8
+
-[CoCalc](https://cocalc.com)
9
+
-[JupyterHub](https://jupyter.org/hub)
10
+
-[Vite](https://vite.dev/)
6
11
7
12
http\-proxy\-3 is a modern API compatible rewrite of
8
13
[http\-proxy](https://github.com/http-party/node-http-proxy), the original nodejs
@@ -22,15 +27,14 @@ Contributors:
22
27
23
28
**Status:**
24
29
25
-
July 12, 2025 STATUS compared to [http-proxy](https://www.npmjs.com/package/http-proxy) and [httpxy](https://www.npmjs.com/package/httpxy):
30
+
August 21, 2025 STATUS compared to [http-proxy](https://www.npmjs.com/package/http-proxy) and [httpxy](https://www.npmjs.com/package/httpxy):
26
31
27
32
- Library entirely rewritten in Typescript in a modern style, with many typings added internally and strict mode enabled.
28
33
- All dependent packages updated to latest versions, addressing all security vulnerabilities according to `pnpm audit`.
29
34
- Code rewritten to not use deprecated/insecure API's, e.g., using `URL` instead of `parse`.
30
35
- Fixed socket leaks in the Websocket proxy code, going beyond [http-proxy-node16](https://www.npmjs.com/package/http-proxy-node16) to also instrument and logging socket counts. Also fixed an issue with uncatchable errors when using websockets.
31
36
- Switch to pnpm for development.
32
37
- More jest unit tests than both http-proxy and httpxy: converted all the http-proxy examples into working unit tests that they actually work (http-proxy's unit tests just setup the examples in many cases, but didn't test that they actually work). Also httpxy seems to have almost no tests. These tests should make contributing PR's much easier.
33
-
- Used in production on https://CoCalc.com and JupyterHub.
**Motivation:** http-proxy is one of the oldest and most famous nodejs modules, and it gets downloaded around 15 million times a week, and I've loved using it for years. Unfortunately, it is [unmaintained](https://github.com/http-party/node-http-proxy/issues/1687), it has significant leaks that [regularly crash production servers](https://github.com/jupyterhub/configurable-http-proxy/issues/434), and is written in ancient untyped Javascript. The maintainers have long since stopped responding, so there is no choice but to fork and start over. I wanted to do my part to help maintain the open source ecosystem, hence this library. I hope you find it useful.
@@ -104,7 +108,7 @@ This is the original user's guide, but with various updates.
104
108
### Core Concept
105
109
106
110
A new proxy is created by calling `createProxyServer` and passing
107
-
an `options` object as argument ([valid properties are available here](lib/http-proxy.js#L26-L42))
111
+
an `options` object as argument ([valid properties are available here](lib/http-proxy/index.ts))
108
112
109
113
```js
110
114
import { createProxyServer } from"http-proxy-3";
@@ -410,7 +414,7 @@ proxyServer.listen(8015);
410
414
411
415
-**xfwd**: true/false, adds x\-forward headers
412
416
413
-
-**secure**: true/false, if you want to verify the SSL Certs. Set this to false if you're proxying another server that has a self-signed cert, e.g., [test/examples/http/proxy-https-to-https.test.ts](test/examples/http/proxy-https-to-https.test.ts).
417
+
-**secure**: true/false, if you want to verify the SSL Certs. Set this to false if you're proxying another server that has a self-signed cert, e.g., [test/examples/http/proxy-https-to-https.test.ts](lib/test/http/proxy-https-to-https.test.ts).
414
418
415
419
-**toProxy**: true/false, passes the absolute URL as the `path`\(useful for proxying to proxies\)
416
420
@@ -614,7 +618,7 @@ pnpm test
614
618
615
619
### Contributing and Issues
616
620
617
-
- Submit a PR! I want this project to be active again! Port ideas from [https://github.com/http\-party/node\-http\-proxy/pulls](https://github.com/http-party/node-http-proxy/pulls) and [https://github.com/http\-party/node\-http\-proxy/issues](https://github.com/http-party/node-http-proxy/issues). Email me at [[email protected]](mailto:[email protected]).
621
+
- Submit a PR! Port ideas from [https://github.com/http\-party/node\-http\-proxy/pulls](https://github.com/http-party/node-http-proxy/pulls) and [https://github.com/http\-party/node\-http\-proxy/issues](https://github.com/http-party/node-http-proxy/issues). Email me at [[email protected]](mailto:[email protected]).
0 commit comments