{"library":"reverse-http","title":"Reverse HTTP Client","description":"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.","language":"javascript","status":"abandoned","last_verified":"Wed Apr 22","install":{"commands":["npm install reverse-http"],"cli":null},"imports":["const reverseHttp = require('reverse-http')","import reverseHttp from 'reverse-http'","const server = reverseHttp(opts)"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const reverseHttp = require('reverse-http')\n\nconst opts = {\n  hostname: 'example.com',\n  path: '/foo'\n}\n\n// Open an HTTP connection to example.com and accept reverse HTTP\n// requests back to this machine. This effectively turns the client\n// into a server for requests coming back through the established tunnel.\nreverseHttp(opts, function (req, res) {\n  console.log('Incoming request:', req.method, req.url)\n\n  res.writeHead(201, {\n    'Content-Type': 'text/plain',\n    'Content-Length': 11\n  })\n\n  res.end('Hello World')\n})\n","lang":"javascript","description":"Demonstrates establishing a reverse HTTP connection and handling an incoming request that arrives back through the tunnel.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}