connects.js exits with an getaddrinfo ENOENT error when specified port different from 443
You need the following code to fix it:
...
var remoteHost = (process.argv[2] || 'localhost').split(':');
var remotePort = remoteHost[1] || 443;
remoteHost=remoteHost[0];
...
tunnel.createTunnel(remoteHost + ':' + remotePort, credentials, args[0], args[1], function(err, server) {
...
var opts = {
host: remoteHost,
port: remotePort,
path: '/auth',
...
connects.js exits with an getaddrinfo ENOENT error when specified port different from 443
You need the following code to fix it: