2024-09-12 13:15:38 +01:00
|
|
|
{"name":"socks","description":"Fully featured SOCKS proxy client supporting SOCKSv4, SOCKSv4a, and SOCKSv5. Includes Bind and Associate functionality.","dist-tags":{"latest":"2.8.3"},"versions":{"2.8.3":{"name":"socks","private":false,"version":"2.8.3","description":"Fully featured SOCKS proxy client supporting SOCKSv4, SOCKSv4a, and SOCKSv5. Includes Bind and Associate functionality.","main":"build/index.js","typings":"typings/index.d.ts","repository":{"type":"git","url":"git+https://github.com/JoshGlazebrook/socks.git"},"bugs":{"url":"https://github.com/JoshGlazebrook/socks/issues"},"engines":{"node":">= 10.0.0","npm":">= 3.0.0"},"author":{"name":"Josh Glazebrook"},"license":"MIT","devDependencies":{"@types/mocha":"^10.0.6","@types/node":"^20.11.17","@typescript-eslint/eslint-plugin":"^6.21.0","@typescript-eslint/parser":"^6.21.0","eslint":"^8.20.0","mocha":"^10.0.0","prettier":"^3.2.5","ts-node":"^10.9.1","typescript":"^5.3.3"},"dependencies":{"ip-address":"^9.0.5","smart-buffer":"^4.2.0"},"scripts":{"prepublish":"npm install -g typescript && npm run build","test":"NODE_ENV=test mocha --recursive --require ts-node/register test/**/*.ts","prettier":"prettier --write ./src/**/*.ts --config .prettierrc.yaml","lint":"eslint 'src/**/*.ts'","build":"rm -rf build typings && prettier --write ./src/**/*.ts --config .prettierrc.yaml && tsc -p .","build-raw":"rm -rf build typings && tsc -p ."},"_id":"socks@2.8.3","gitHead":"a2a06d9967edfaa317e6d20d33963b95a3e654e3","_nodeVersion":"20.11.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==","shasum":"1ebd0f09c52ba95a09750afe3f3f9f724a800cb5","tarball":"http://localhost:4260/socks/socks-2.8.3.tgz","fileCount":32,"unpackedSize":156302,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCK1DTr6IDjVG3NrjjnBKEwJ3UIUhA0yGDE6+Troh5+ugIgV5jooHtwcnN5GVpk4HeGWlTt3VbJghKRRQe0ztJjc9k="}]},"directories":{},"_hasShrinkwrap":false}},"readme":"# socks [![Build Status](https://travis-ci.org/JoshGlazebrook/socks.svg?branch=master)](https://travis-ci.org/JoshGlazebrook/socks) [![Coverage Status](https://coveralls.io/repos/github/JoshGlazebrook/socks/badge.svg?branch=master)](https://coveralls.io/github/JoshGlazebrook/socks?branch=v2)\n\nFully featured SOCKS proxy client supporting SOCKSv4, SOCKSv4a, and SOCKSv5. Includes Bind and Associate functionality.\n\n> Looking for Node.js agent? Check [node-socks-proxy-agent](https://github.com/TooTallNate/node-socks-proxy-agent).\n\n### Features\n\n* Supports SOCKS v4, v4a, v5, and v5h protocols.\n* Supports the CONNECT, BIND, and ASSOCIATE commands.\n* Supports callbacks, promises, and events for proxy connection creation async flow control.\n* Supports proxy chaining (CONNECT only).\n* Supports user/password authentication.\n* Supports custom authentication.\n* Built in UDP frame creation & parse functions.\n* Created with TypeScript, type definitions are provided.\n\n### Requirements\n\n* Node.js v10.0+ (Please use [v1](https://github.com/JoshGlazebrook/socks/tree/82d83923ad960693d8b774cafe17443ded7ed584) for older versions of Node.js)\n\n### Looking for v1?\n* Docs for v1 are available [here](https://github.com/JoshGlazebrook/socks/tree/82d83923ad960693d8b774cafe17443ded7ed584)\n\n## Installation\n\n`yarn add socks`\n\nor\n\n`npm install --save socks`\n\n## Usage\n\n```typescript\n// TypeScript\nimport { SocksClient, SocksClientOptions, SocksClientChainOptions } from 'socks';\n\n// ES6 JavaScript\nimport { SocksClient } from 'socks';\n\n// Legacy JavaScript\nconst SocksClient = require('socks').SocksClient;\n```\n\n## Quick Start Example\n\nConnect to github.com (192.30.253.113) on port 80, using a SOCKS proxy.\n\n```javascript\nconst options = {\n proxy: {\n host: '159.203.75.200', // ipv4 or ipv6 or hostname\n port: 1080,\n type: 5 // Proxy version (4 or 5)\n },\n\n command: 'connect', // SOCKS command (createConnection factory function only supports the connect command)\n\n destination: {\n host: '192.30.2
|