importhttpsfrom'https';import{SocksProxyAgent}from'socks-proxy-agent';constagent=newSocksProxyAgent('socks://your-name%40gmail.com:abcdef12345124@br41.nordvpn.com');https.get('https://ipinfo.io',{agent},(res)=>{console.log(res.headers);res.pipe(process.stdout);}); ...
由于需要使用socks代理,查看了nodejs的各种socks库,最终的结论是socks库是其中最完善的,而socks-proxy-agent是以其为基础的封装,可以直接和http模块对接。 不过在尝试后发现socks-proxy-agent建立的连接无法使用认证功能,而直接使用socks库是可以的。因此查看了其源码。 varoptions ={ proxy: { ipaddress: proxy.host...
$ npm install @httptoolkit/socks-proxy-agent Examples TypeScript example importhttpsfrom'https';import{ SocksProxyAgent }from'socks-proxy-agent';constinfo = { host:'br41.nordvpn.com', userId:'your-name@gmail.com', password:'abcdef12345124'};constagent =newSocksProxyAgent(info); https.get...
$npm install socks-proxy-agent /Processing... ✓Done Start your free trial 32 Releases 8.0.5 Stable version 4months ago Released 8.0.49 months ago 8.0.31 year ago 8.0.22 years ago 8.0.12 years ago 8.0.02 years ago 7.0.03 years ago 6.2.13 years ago 6.2.03 years ago 6.2.0-beta...
问npm安装错误:SocksProxyAgent不是构造函数ENC++在建立一个对象时,常常需要作某些初始化,如果一个数据...
40 - "socks-proxy-agent": "^8.0.3" 39 + "proxy-agent": "^6.4.0" 41 40 }, 42 41 "devDependencies": { 43 42 "@types/fs-extra": "^11.0.4", There was a problem loading the remainder of the diff. 0 commit comments Comments0 (0) Please sign in to comment....
TooTallNate/node-socks-proxy-agentPublic archive NotificationsYou must be signed in to change notification settings Fork85 Star332 master 1Branch26Tags Code Folders and files Name Last commit message Last commit date Latest commit TooTallNate ...
agent = agent; http.get(opts, function (res) { console.log('"response" event!', res.headers); res.pipe(process.stdout); });https module examplevar url = require('url'); var https = require('https'); var SocksProxyAgent = require('socks-proxy-agent'); // SOCKS proxy to connect...
由于需要使用socks代理,查看了nodejs的各种socks库,最终的结论是socks库是其中最完善的,而socks-proxy-agent是以其为基础的封装,可以直接和http模块对接。 不过在尝试后发现socks-proxy-agent建立的连接无法使用认证功能,而直接使用socks库是可以的。因此查看了其源码。
$ npm install socks-proxy-agent Examples http module example var url = require('url'); var http = require('http'); var SocksProxyAgent = require('socks-proxy-agent'); // SOCKS proxy to connect to var proxy = process.env.socks_proxy || 'socks://127.0.0.1:9050'; console.log('using...