socks5-http-client
socks5-http-client copied to clipboard
RequestError: Error:connect ETIMEDOUT occurred with some socks5 server
the socks5 agent work well with some public socks5 servers, but may failed with some else.
1 I confirmed the socks5 server is ok, i checked it buy using it on chrome and socks lib(another lib)
2 my core test code is like this
request.get(url, { agentClass: Agent, agentOptions: { socksHost:proxy.ip, socksPort:proxy.port } });
3 the error log is long, like this:
proxy: Proxy { ip: '122.192.32.79', port: 1080, protocol: 'socks5' } test failed: { RequestError: Error: connect ETIMEDOUT 122.192.32.79:1080 at new RequestError (h:\workspace\jdmsk\node_modules\request-promise-core\lib\errors.js:14:15) at Request.module.exports.plumbing.callback (h:\workspace\jdmsk\node_modules\request-promise-core\lib\plumbing.js:87:29) at Request.RP$callback [as _callback] (h:\workspace\jdmsk\node_modules\request-promise-core\lib\plumbing.js:46:31) at Request.init.self.callback (h:\workspace\jdmsk\node_modules\request\request.js:186:22) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at Request.onRequestError (h:\workspace\jdmsk\node_modules\request\request.js:845:8) at emitOne (events.js:96:13) at ClientRequest.emit (events.js:188:7) at Socks5ClientSocket.socketErrorListener (_http_client.js:309:9) at emitOne (events.js:101:20) at Socks5ClientSocket.emit (events.js:188:7) at Socket.<anonymous> (h:\workspace\jdmsk\node_modules\socks5-client\lib\Socket.js:39:8) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at emitErrorNT (net.js:1281:8) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9) name: 'RequestError', message: 'Error: connect ETIMEDOUT 122.192.32.79:1080', cause: { Error: connect ETIMEDOUT 122.192.32.79:1080 at Object.exports._errnoException (util.js:1022:11) at exports._exceptionWithHostPort (util.js:1045:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14) code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect', address: '122.192.32.79', port: 1080 }, error: { Error: connect ETIMEDOUT 122.192.32.79:1080 at Object.exports._errnoException (util.js:1022:11) at exports._exceptionWithHostPort (util.js:1045:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14) code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect', address: '122.192.32.79', port: 1080 }, options: { agentClass: { [Function: Agent] super_: [Object] }, agentOptions: { socksHost: '122.192.32.79', socksPort: 1080 }, uri: 'http://www.ownchip.cn/myip.php', method: 'GET', callback: [Function: RP$callback], transform: undefined, simple: true, resolveWithFullResponse: false, transform2xxOnly: false }, response: undefined }
the servers i found not work with this lib are : 122.192.32.76:7280, 61.238.32.69:1080, 122.192.32.79:7280 they are public servers, maybe unavailable some time.