{"library":"node-http-proxy","title":"Node.js Process-Based HTTP Proxy","description":"This package, `node-http-proxy` by 'wddqing', provides an HTTP(S) proxy server for Node.js, distinguished by its support for both single and multi-process modes, configurable via a command-line interface (`nproxy`) or programmatic API. It was last published as version 0.2.4 over five years ago and requires a very old Node.js environment (>=0.10). The package is considered abandoned, lacks active maintenance, and is not compatible with modern Node.js versions or current web standards. It should not be confused with the widely-used and actively maintained `http-proxy` library from `http-party`, which offers a different API and feature set. Due to its age and lack of updates, using this specific `node-http-proxy` in contemporary projects poses significant compatibility and security risks.","language":"javascript","status":"abandoned","last_verified":"Wed Apr 22","install":{"commands":["npm install node-http-proxy"],"cli":{"name":"nproxy","version":null}},"imports":["const { proxyMaster: ProxyMaster } = require('node-http-proxy');","npm install -g node-http-proxy && nproxy start -p 9999 -i 1"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const { proxyMaster: ProxyMaster } = require('node-http-proxy');\n\nconst port = process.env.PROXY_PORT ? parseInt(process.env.PROXY_PORT) : 8123;\nconst instances = process.env.PROXY_INSTANCES ? parseInt(process.env.PROXY_INSTANCES) : 1;\n\nconsole.log(`Starting Node HTTP Proxy on port ${port} with ${instances} instance(s)...`);\n\nconst proxymaster = new ProxyMaster({\n  instance: instances,\n  port: port\n});\n\nproxymaster.start();\n\n// Example of how to stop the server (optional, for demonstration)\n// setTimeout(() => {\n//   console.log('Stopping proxy master...');\n//   // Note: The original package's stop mechanism is primarily CLI-driven.\n//   // Programmatic stopping might require deeper inspection or process killing.\n// }, 10000);\n\nconsole.log('Proxy server initialized. Use `curl -x 127.0.0.1:' + port + ' http://www.google.com/` to test.');","lang":"javascript","description":"Demonstrates how to programmatically start a `node-http-proxy` server with a configurable port and number of worker instances.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}