m2ys4u / socksjs Goto Github PK
View Code? Open in Web Editor NEWA SOCKS (v5) client library for node.js
License: MIT License
A SOCKS (v5) client library for node.js
License: MIT License
[Uncaught exception] TypeError: Cannot read property 'length' of undefined
TypeError: Cannot read property 'length' of undefined
at Function.Buffer.concat (buffer.js:488:20)
at socksRequest (/var/KiwiIRC/node_modules/socksjs/socks.js:120:35)
at socksAuth (/var/KiwiIRC/node_modules/socksjs/socks.js:90:22)
at Socket.g (events.js:175:14)
at Socket.EventEmitter.emit (events.js:95:17)
at Socket. (stream_readable.js:710:14)
at Socket.EventEmitter.emit (events.js:92:17)
at emitReadable (_stream_readable.js:382:10)
at emitReadable (_stream_readable.js:378:5)
at readableAddChunk (_stream_readable.js:143:7)
at Socket.Readable.push (_stream_readable.js:113:10)]
Tried an example from this Gist https://gist.github.com/abtris/3eb89a5b8862ee0819f23649420beb55
Debugger attached.
Waiting for the debugger to disconnect...
<proj name>\node_modules\pg\lib\connection.js:38
this.stream.setNoDelay(true)
^
TypeError: this.stream.setNoDelay is not a function
at Connection.connect (<proj name>\node_modules\pg\lib\connection.js:38:17)
at Client._connect (<proj name>\node_modules\pg\lib\client.js:104:11)
at Client.connect (<proj name>\node_modules\pg\lib\client.js:152:12)
at Object.<anonymous> (<proj name>\test2.js:40:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47
Process exited with code 1
My packages
"dependencies": {
"pg": "^8.4.1",
"socksjs": "^0.5.0"
},
var socks = require('socksjs');
var dest = {
host: 'irc.freenode.net',
port: 6667,
ssl: false
};
var socks_server = {
host: '127.0.0.1',
port: 1080
};
s = socks.connect(dest, socks_server, function() {
console.log(s.socksAddress, s.socksPort);
});
Gives output: 0.0.0.0 0
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.