ehpi
supports both forward and reverse proxying types.
HTML-rendered documentation can be found here.
ehpi - Enhanced HTTP Proxy Implementation module.
Used for Gzip stream compression of the response.
Used to access internal HTTP APIs.
Used to access internal Socket APIs.
Used to parse host information.
Used for caching response stream from the target.
Enable debug logging by passing DEBUG=ehpi
.
Constructs an ehpi instance.
options
Object The configuration options for the proxy server.
Server's port number.
Server's internal error event handler.
Server's before request event handler.
Server's before response event handler.
Server's request error event handler.
Starts the Proxy Server.
Server's global request handler.
Handles SYN operation back to socket after connection is established, else throws.
Initiates request from the Proxy server for the requested resource.
requestOptions
Object The host, port, path, method, and header values.req
Object The request stream object literal.res
Object The response stream object literal.proxy
Object The instantiated ehpi instance.
Acknowledges Tunnel errors and attempts to gracefully close the socket, else throw.
e
Object The error object literal.
Attempts to connect to target URI and establish a tunnel.
requestOptions
Object The host, port, path, method, and header values.socket
Object The socket used for SYN operation.
Utility function that writes input to socket.