https://github.com/fijimunkii/node-proxyproto
Pre-process PROXY protocol headers from node tcp sockets
https://github.com/fijimunkii/node-proxyproto
nodejs proxy proxy-proto proxy-protocol proxyproto proxyprotocol socket tcp
Last synced: 11 months ago
JSON representation
Pre-process PROXY protocol headers from node tcp sockets
- Host: GitHub
- URL: https://github.com/fijimunkii/node-proxyproto
- Owner: fijimunkii
- License: isc
- Created: 2019-03-19T17:27:50.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-02-13T16:07:55.000Z (about 6 years ago)
- Last Synced: 2025-04-06T00:31:52.611Z (11 months ago)
- Topics: nodejs, proxy, proxy-proto, proxy-protocol, proxyproto, proxyprotocol, socket, tcp
- Language: JavaScript
- Homepage:
- Size: 30.3 KB
- Stars: 4
- Watchers: 4
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# node-proxyproto
Pre-process PROXY protocol headers from node tcp sockets
[](https://opensource.org/licenses/ISC)
This will allow a regular node server to accept PROXY protocol v2 connections
Just pass in your server to get running:
```js
const server = require('http').createServer((req,res) => res.end('OK'));
server.listen(5555);
const proxied = require('proxyproto').createServer(server);
```
Server can be net, http, https, tls, etc
All available options:
```js
require('proxyproto').createServer(server, {
setNoDelay: true, // diable nagle algorithm
handleCommonErrors: false, // handle common socket errors (default: true)
onError: err => log.error(err) // error handler for servers and sockets
});
```
## Performance
Load test shows neglible latency difference with a vanilla http server
## Authors
fijimunkii
## License
This project is licensed under the ISC License - see the [LICENSE](LICENSE.txt) file for details.