Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting error while using socksv5 in my node js application #40

Open
vinodpalne opened this issue Sep 19, 2018 · 2 comments
Open

getting error while using socksv5 in my node js application #40

vinodpalne opened this issue Sep 19, 2018 · 2 comments

Comments

@vinodpalne
Copy link

var socks = require('socksv5'),
SSHClient = require('ssh2').Client;

const fixieUrl = "here is flexi url";
const fixieValues = fixieUrl.split(new RegExp('[/(:\/@)/]+'));

socks.connect({
host: 'ssh.example.org',
port: 22,
proxyHost: fixieValues[2],
proxyPort: fixieValues[3],
auths: [socks.auth.UserPassword(fixieValues[0], fixieValues[1])]
}, function(socket) {

});

Throwing Error

TypeError: normalizeConnectArgs is not a function
at Object.exports.connect.exports.createConnection (E:\NodeExample\AWSSSH2\AWSWithHeroku\node-js-getting-started\node_modules\socksv5\lib\client.js:225:14)
at Object. (E:\NodeExample\AWSSSH2\AWSWithHeroku\node-js-getting-started\index.js:3:20)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3

@femanzo
Copy link

femanzo commented Sep 30, 2018

I was having this issue because I followed @luminati-io/socksv5 package instructions, and installed this instead of @luminati-io/socksv5
if that is the case:
npm rm socksv5
npm i @luminati-io/socksv5

@nighthawkk
Copy link

change 2nd line
in
/node_modules/socksv5/lib/client.js

normalizeConnectArgs = net._normalizeArgs,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants