-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Trying to connect to a web socket with a proxy agent (tor)
Using ubuntu 18
Node v8.16.1
The message is sent to the endpoit at ngrok.io, but the application crashes right after.
Code:
const Agent = require("socks5-http-client/lib/Agent"); // Constructor
let agent = new Agent({
socksHost: 'localhost', // Defaults to 'localhost'.
socksPort: 9050 // Defaults to 1080.
});
var socket = require('socket.io-client').connect('http://38d7b774.ngrok.io', { agent: agent });
socket.on('connect', function() {
socket.emit('send', 'random');
});
Error:
_http_client.js:486
socket._readableState.flowing = null;
^
TypeError: Cannot set property 'flowing' of undefined
at Socks5ClientSocket.socketOnData (_http_client.js:486:37)
at emitOne (events.js:116:13)
at Socks5ClientSocket.emit (events.js:211:7)
at Socket.<anonymous> (/home/caramori/Documents/Jera/Node/trk-core/node_modules/socks5-client/lib/Socket.js:150:8)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
at Socket.Readable.push (_stream_readable.js:208:10)
at TCP.onread (net.js:601:20)
Metadata
Metadata
Assignees
Labels
No labels