mattcg / socks5-client Goto Github PK
View Code? Open in Web Editor NEWSOCKS v5 client socket implementation in JavaScript for Node.JS.
License: Other
SOCKS v5 client socket implementation in JavaScript for Node.JS.
License: Other
I get data in this line - https://github.com/mattcg/socks5-client/blob/master/lib/Socket.js#L133
But then nothing happens.
Why?
Why this atttr-s is undefined:
self.socket.parser = self.parser;
self.socket.ondata = self.ondata;
https://github.com/mattcg/socks5-client/blob/master/lib/Socket.js#L137
Fedora 32 socket5 proxy emits: (but on Ubuntu/Mac it works well) Node v15.9.0
socket hang up at connResetException (node:internal/errors:642:14) at Socks5ClientSocket.socketOnEnd (node:_http_client:486:23) at Socks5ClientSocket.emit (node:events:390:22) at TLSSocket.<anonymous> (/root/dotalaning/node_modules/socks5-client/lib/Socket.js:146:8) at TLSSocket.emit (node:events:390:22) at endReadableNT (node:internal/streams/readable:1307:12) at processTicksAndRejections (node:internal/process/task_queues:81:21) { code: 'ECONNRESET' } {
Error: SOCKS connection failed. Connection refused.
at Socket.socket.ondata (/home/apps/myapps/node_modules/socks5-http-client/node_modules/socks5-client/lib/socket.js:193:12)
at TCP.onread (net.js:527:27)
I use tor service. is it because tor service timeout, or something wrong with socket.js? could you update this module and check the probability of bug for latest node?
Most other socket consumers listen on the data
event instead of the ondata
provided by ReadableStream
.
me@devserv:/scripts/search$ npm install socks5-http-client
npm http GET https://registry.npmjs.org/socks5-http-client
npm http 304 https://registry.npmjs.org/socks5-http-client
npm http GET https://registry.npmjs.org/socks5-client
npm http 304 https://registry.npmjs.org/socks5-client
npm http GET https://registry.npmjs.org/ipv6
npm http GET https://registry.npmjs.org/network-byte-order
npm http 304 https://registry.npmjs.org/network-byte-order
npm http 304 https://registry.npmjs.org/ipv6
npm http GET https://registry.npmjs.org/sprintf
npm http GET https://registry.npmjs.org/cli
npm http GET https://registry.npmjs.org/cliff
npm http GET https://registry.npmjs.org/eyes
npm http 304 https://registry.npmjs.org/cli
npm http 304 https://registry.npmjs.org/eyes
npm http 304 https://registry.npmjs.org/sprintf
npm http 304 https://registry.npmjs.org/cliff
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/colors
npm http GET https://registry.npmjs.org/winston
npm http 304 https://registry.npmjs.org/glob
npm http 304 https://registry.npmjs.org/winston
npm http GET https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/colors
npm http GET https://registry.npmjs.org/stack-trace
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/pkginfo
npm http GET https://registry.npmjs.org/cycle
npm http GET https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/pkginfo
npm http 304 https://registry.npmjs.org/stack-trace
npm http 304 https://registry.npmjs.org/cycle
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/lru-cache
npm http 304 https://registry.npmjs.org/sigmund
npm ERR! Error: ENOENT, chmod '/scripts/node_modules/socks5-http-client/node_modules/socks5-client/node_modules/ipv6/bin/ipv6ack.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <[email protected]>
npm ERR! System Linux 2.6.32-5-686
npm ERR! command "node" "/usr/local/bin/npm" "install" "socks5-http-client"
npm ERR! cwd /scripts/search
npm ERR! node -v v0.10.3
npm ERR! npm -v 1.3.0
npm ERR! path /scripts/node_modules/socks5-http-client/node_modules/socks5-client/node_modules/ipv6/bin/ipv6ack.js
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /scripts/search/npm-debug.log
npm ERR! not ok code 0
Looks like a dependency in socks5-client is broken?
I need use socks5 proxy with node-imap.
Can you advice me how to bind libraries?
When trying to make a GET request to an url of type https://url.com:8075 via request
.
var Agent = require('socks5-https-client/lib/Agent');
request({
method: 'GET',
url: "https://url.com:8075",
agentClass: Agent,
}
Then this error is thrown Failure with error: TypeError: Invalid port: 8075.
The failure seems to be caused because the port number is passed in as a String, request
seems to pass the port number as a string instead of as an integer.
Can't use it as an agent with request using Node 4.2.1
Example also doesnt work.
Proxy is a TOR proxy.
Edit: The issue is concerning socks5-http-client. But the problem seems to lie in this library.
โ High severity vuln found in [email protected], introduced via [email protected]
Description: Prototype Pollution
Info: https://snyk.io/vuln/SNYK-JS-LODASHMERGE-173732
From: [email protected] > [email protected] > [email protected] > [email protected]
You should make Socks5ClientSocket accessible in the default export, so people can use this package as a raw socket.
after this "FIX" I got same problem with socket hang up: nodejs/node@bee7a72
combined with request library and node v15.7.0 or newer gives me "Error: socket hang up", with 15.6.0 everything is fine.
Error: SOCKS authentication failed. No acceptable authentication methods were offered.
at Socket. ((my project path)\node_modules\socks5-client\lib\Socket.js:178:25)
at Object.onceWrapper (node:events:510:26)
at Socket.emit (node:events:402:35)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at TCP.onStreamRead (node:internal/stream_base_commons:199:23)
Hello, is it possible to add socks authorization support to your lib?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.