mirror of
https://github.com/denoland/deno.git
synced 2025-01-06 22:35:51 -05:00
1 line
3.8 KiB
JSON
1 line
3.8 KiB
JSON
{"name":"socks-proxy-agent","description":"A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS","dist-tags":{"latest":"8.0.4"},"versions":{"8.0.4":{"name":"socks-proxy-agent","version":"8.0.4","description":"A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS","main":"./dist/index.js","types":"./dist/index.d.ts","author":{"name":"Nathan Rajlich","email":"nathan@tootallnate.net","url":"http://n8.io/"},"repository":{"type":"git","url":"git+https://github.com/TooTallNate/proxy-agents.git","directory":"packages/socks-proxy-agent"},"dependencies":{"agent-base":"^7.1.1","debug":"^4.3.4","socks":"^2.8.3"},"devDependencies":{"@types/async-retry":"^1.4.5","@types/debug":"^4.1.7","@types/dns2":"^2.0.3","@types/jest":"^29.5.1","@types/node":"^14.18.45","async-listen":"^3.0.0","async-retry":"^1.3.3","cacheable-lookup":"^6.1.0","dns2":"^2.1.0","jest":"^29.5.0","socksv5":"github:TooTallNate/socksv5#fix/dstSock-close-event","ts-jest":"^29.1.0","typescript":"^5.0.4","proxy":"2.2.0","tsconfig":"0.0.0"},"engines":{"node":">= 14"},"license":"MIT","scripts":{"build":"tsc","test":"jest --env node --verbose --bail test/test.ts","test-e2e":"jest --env node --verbose --bail test/e2e.test.ts","lint":"eslint . --ext .ts","pack":"node ../../scripts/pack.mjs"},"_id":"socks-proxy-agent@8.0.4","bugs":{"url":"https://github.com/TooTallNate/proxy-agents/issues"},"_integrity":"sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==","_resolved":"/tmp/407e2a13e47683d55ba12268a88dc928/socks-proxy-agent-8.0.4.tgz","_from":"file:socks-proxy-agent-8.0.4.tgz","_nodeVersion":"20.15.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==","shasum":"9071dca17af95f483300316f4b063578fa0db08c","tarball":"http://localhost:4260/socks-proxy-agent/socks-proxy-agent-8.0.4.tgz","fileCount":8,"unpackedSize":24807,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVGE9sWVNsvXQxNfnxkVYDLtr6au/T9keiMS8qqpx5xAIgAdieGvxZXNLSv9g8QcnXPcB16VC91E6Vi1CIjwLnaQQ="}]},"directories":{},"_hasShrinkwrap":false}},"author":{"name":"Nathan Rajlich","email":"nathan@tootallnate.net","url":"http://n8.io/"},"repository":{"type":"git","url":"git+https://github.com/TooTallNate/proxy-agents.git","directory":"packages/socks-proxy-agent"},"license":"MIT","homepage":"https://github.com/TooTallNate/proxy-agents#readme","bugs":{"url":"https://github.com/TooTallNate/proxy-agents/issues"},"readme":"socks-proxy-agent\n================\n### A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS\n\nThis module provides an `http.Agent` implementation that connects to a\nspecified SOCKS proxy server, and can be used with the built-in `http`\nand `https` modules.\n\nIt can also be used in conjunction with the `ws` module to establish a WebSocket\nconnection over a SOCKS proxy. See the \"Examples\" section below.\n\nExamples\n--------\n\n```ts\nimport https from 'https';\nimport { SocksProxyAgent } from 'socks-proxy-agent';\n\nconst agent = new SocksProxyAgent(\n\t'socks://your-name%40gmail.com:abcdef12345124@br41.nordvpn.com'\n);\n\nhttps.get('https://ipinfo.io', { agent }, (res) => {\n\tconsole.log(res.headers);\n\tres.pipe(process.stdout);\n});\n```\n\n#### `ws` WebSocket connection example\n\n```ts\nimport WebSocket from 'ws';\nimport { SocksProxyAgent } from 'socks-proxy-agent';\n\nconst agent = new SocksProxyAgent(\n\t'socks://your-name%40gmail.com:abcdef12345124@br41.nordvpn.com'\n);\n\nvar socket = new WebSocket('ws://echo.websocket.events', { agent });\n\nsocket.on('open', function () {\n\tconsole.log('\"open\" event!');\n\tsocket.send('hello world');\n});\n\nsocket.on('message', function (data, flags) {\n\tconsole.log('\"message\" event! %j %j', data, flags);\n\tsocket.close();\n});\n```","readmeFilename":"README.md"}
|