reverse-http is a JavaScript client library designed to establish a reverse HTTP connection to a server that supports the Reverse HTTP (PTTH/1.0) draft specification. This unique protocol allows an outbound HTTP connection from a client to act as a server, receiving incoming HTTP requests from the remote endpoint. The library is currently at version 1.3.0 and explicitly requires a Node.js runtime of version 0.12 or higher. Given the extremely old engine requirement, it is effectively unmaintained for modern Node.js environments and does not follow a current release cadence. Its primary differentiator is its specific implementation of the niche PTTH/1.0 protocol, offering a way for clients behind restrictive firewalls or NATs to expose services.
npm install reverse-httpVerified import paths — ran on the pinned version, not inferred.
Demonstrates establishing a reverse HTTP connection and handling an incoming request that arrives back through the tunnel.
This package is fundamentally designed for old Node.js runtimes. Running it on modern Node.js versions will likely lead to errors. Consider finding an alternative or using an old, insecure Node.js environment at your own risk.
Ensure that the server you are connecting to explicitly supports the PTTH/1.0 protocol. For new projects, consider modern alternatives like WebSockets for bidirectional communication.
Create a `reverse-http.d.ts` file with basic type declarations, for example: `declare module 'reverse-http';` or more detailed definitions if needed. Alternatively, use `@ts-ignore` or `any` for untyped imports.
Avoid using this package for secure communications if running on older Node.js versions. If using a modern Node.js version, compatibility issues will likely arise before TLS problems. Modern secure communication requires a actively maintained library.
For ESM projects, use `import reverseHttp from 'reverse-http';`. If the file is part of a CommonJS module, ensure `type: 'module'` is not set in `package.json` or the file uses `.cjs` extension.
Use a default ESM import: `import reverseHttp from 'reverse-http';`. CommonJS modules export a single value that becomes the default export when imported via ESM.
This issue is often a symptom of the package's fundamental incompatibility with modern environments. There is no direct fix for this package's core. You would need to move to a maintained library or explicitly, and insecurely, disable certificate verification (`rejectUnauthorized: false`), which is strongly discouraged for production.
No dependency data recorded yet.