{"library":"socks5-http-client","title":"SOCKS5 HTTP Client for Node.js","type":"library","description":"This package provides a SOCKS v5 HTTP client implementation specifically for Node.js environments. It enables making HTTP requests through a SOCKS5 proxy, commonly used for anonymizing traffic via services like Tor. The current stable version is 1.0.4, last published over eight years ago (July 2018). The library focuses solely on HTTP, explicitly directing users to a separate `socks5-https-client` package for HTTPS. Its primary differentiators were its straightforward integration with the deprecated `request` library and its direct support for SOCKS5 proxying, including authentication. Due to its age and lack of updates, it is largely incompatible with modern Node.js versions and lacks contemporary features like Promise-based APIs.","language":"javascript","status":"abandoned","last_verified":"Thu Apr 23","install":{"commands":["npm install socks5-http-client"],"cli":null},"imports":["const shttp = require('socks5-http-client');","const Agent = require('socks5-http-client/lib/Agent');","const shttp = require('socks5-http-client'); shttp.get('http://example.com', () => {});"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":"https://github.com/mattcg/socks5-http-client","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/socks5-http-client","openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"const shttp = require('socks5-http-client');\n\nconst SOCKS_HOST = process.env.SOCKS_HOST ?? 'localhost';\nconst SOCKS_PORT = parseInt(process.env.SOCKS_PORT ?? '1080', 10);\n\nshttp.get({\n  hostname: 'www.example.com',\n  path: '/',\n  socksHost: SOCKS_HOST,\n  socksPort: SOCKS_PORT,\n  // Optional SOCKS5 authentication\n  // socksUsername: process.env.SOCKS_USERNAME,\n  // socksPassword: process.env.SOCKS_PASSWORD,\n}, function(res) {\n  res.setEncoding('utf8');\n  let data = '';\n  res.on('data', function(chunk) {\n    data += chunk;\n  });\n  res.on('end', function() {\n    console.log('Received response:');\n    console.log(data.substring(0, 200) + '...'); // Log first 200 chars\n  });\n}).on('error', (e) => {\n  console.error(`Request failed: ${e.message}`);\n});","lang":"javascript","description":"This example demonstrates how to make a basic HTTP GET request through a SOCKS5 proxy configured via environment variables, logging the initial part of the response body.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}