http-proxy-to-socks (hpts) is a command-line interface (CLI) tool for Node.js designed to convert a SOCKS proxy into an HTTP proxy. This utility is particularly useful in environments where applications or clients only support HTTP proxy configurations, but the available upstream proxy is SOCKS-based. It operates by launching a local HTTP proxy server that intercepts HTTP requests and transparently forwards them through a user-specified SOCKS proxy. The package is currently at version 1.1.4, with its last update approximately six years ago, indicating it is likely in an abandoned or unmaintained state. While it fulfills a specific niche, users should be aware of its age and lack of recent updates. Key differentiators include its simplicity and direct command-line utility for this specific proxy conversion task, contrasting with more comprehensive proxy agents or libraries that might offer programmatic integration.
npm install http-proxy-to-socksVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to programmatically execute the `hpts` command-line tool using Node.js's `child_process` module to set up an HTTP proxy on port 8080, forwarding traffic through a SOCKS proxy running on 127.0.0.1:1080. It simulates typical CLI usage for integration or testing.
Use `npm install -g http-proxy-to-socks` and then execute the `hpts` command directly from the terminal or through `child_process.exec`/`spawn` in Node.js applications.
Evaluate newer, actively maintained alternatives like `socks-proxy-agent` or `https-socks-proxy` if programmatic integration is needed, or explore other CLI-based proxy conversion tools if maintenance is a concern. For critical systems, consider the risks of using unmaintained software.
Verify your SOCKS proxy server status and configuration (e.g., `socks://127.0.0.1:1080`) before launching `hpts`. Check firewall rules and network connectivity between `hpts` and the SOCKS server.
Choose a different, available port for the HTTP proxy. For example, `hpts -s 127.0.0.1:1080 -p 8081`.
Ensure your SOCKS proxy (e.g., `socks://127.0.0.1:1080`) is running and accessible from where `hpts` is executed. Double-check the host and port in the `-s` argument for typos. Check local firewall settings.
Install the package globally using `npm install -g http-proxy-to-socks`. If it's still not found, verify npm's global bin directory is in your system's PATH.
No dependency data recorded yet.