mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
add port specification option to ssh tunnel url
This commit is contained in:
@@ -30,7 +30,13 @@ Fiber(function () {
|
||||
}
|
||||
|
||||
var sshTunnel = function (to, localPort, remoteEnd, keyfile) {
|
||||
var args = [to, '-L', localPort+':'+remoteEnd, 'echo __CONNECTED__ && cat -'];
|
||||
var args = [];
|
||||
if (to.split(':')[1]){
|
||||
var hostPort = to.split(':');
|
||||
to = hostPort[0];
|
||||
args = ['-p', hostPort[1]].concat(args);
|
||||
}
|
||||
args = args.concat([to, '-L', localPort+':'+remoteEnd, 'echo __CONNECTED__ && cat -']);
|
||||
if (keyfile)
|
||||
args = ["-i", keyfile].concat(args);
|
||||
var tunnel = cp.spawn('ssh', args, {
|
||||
|
||||
Reference in New Issue
Block a user