File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,12 @@ The port to forward from the server
8080
8181* Default:* ` 6379 `
8282
83+ ### dstHost
84+
85+ The host to forward to on the destination server.
86+
87+ * Default:* ` localhost `
88+
8389### srcPort
8490
8591The local port for the forwarding
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ module.exports = {
1919 name : options . name ,
2020 defaultConfig : {
2121 dstPort : 6379 ,
22+ dstHost : 'localhost' ,
2223 srcPort : function ( ) {
2324 var range = MAX_PORT_NUMBER - MIN_PORT_NUMBER + 1 ;
2425 return Math . floor ( Math . random ( ) * range ) + MIN_PORT_NUMBER ;
@@ -42,6 +43,7 @@ module.exports = {
4243 var sshConfig = {
4344 host : this . readConfig ( 'host' ) ,
4445 dstPort : this . readConfig ( 'dstPort' ) ,
46+ dstHost : this . readConfig ( 'dstHost' ) ,
4547 username : this . readConfig ( 'username' ) ,
4648 localPort : srcPort ,
4749 privateKey : this . readConfig ( 'privateKeyPath' )
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ previous.push(current);
108108
109109 return previous ;
110110 } , [ ] ) ;
111- assert . equal ( messages . length , 4 ) ;
111+ assert . equal ( messages . length , 5 ) ;
112112 } ) ;
113113
114114 it ( 'adds default config to the config object' , function ( ) {
@@ -124,6 +124,7 @@ previous.push(current);
124124 plugin . beforeHook ( context ) ;
125125 plugin . configure ( context ) ;
126126 assert . isDefined ( config [ 'ssh-tunnel' ] . dstPort ) ;
127+ assert . isDefined ( config [ 'ssh-tunnel' ] . dstHost ) ;
127128 assert . isDefined ( config [ 'ssh-tunnel' ] . srcPort ) ;
128129 assert . isDefined ( config [ 'ssh-tunnel' ] . tunnelClient ) ;
129130 assert . isDefined ( config [ 'ssh-tunnel' ] . privateKeyPath ) ;
You can’t perform that action at this time.
0 commit comments