gemini-tunnel
v1.4.0
Published
Plugin for setting up ssh tunnel while running tests with Gemini
Downloads
15
Readme
gemini-tunnel
Plugin for setting up ssh tunnel while running tests with Gemini.
Installation
npm install gemini-tunnel
Configuration
- host Address of remote host to which tunnel which will be established.
- ports Ports range on remote host, port will be picked randomly from this range. If required to set specific port, min and max values must same.
- ports.min Min port number.
- ports.max Max port number.
- localport Available port on local machine.
- user (optional) User to connect to remote host
- enabled (optional) Determines is plugin enabled. If option set as
false
, plugin will do nothing, otherwise plugin will work. - retries (optional) Number of attempts to establish tunnel. Defaults to 5 times.
- protocol (optional) Protocol which will be used in resulting root url. Defaults to
http
- hostDecorator (optional) Function which can be used to decorate hostname before it will be written into rootUrl
Set the configuration to your .gemini.js
system: {
plugins: {
gemini-tunnel: {
host: 'remote_host_address',
user: 'user',
ports: {
min: 8000,
max: 8100
},
localport: 8080,
enabled: true,
retries: 3,
protocol: 'https',
hostDecorator: (baseHost) => { // hostname from the original rootUrl
return /^m\./.test(baseHost)
? 'm.remote_host_address'
: 'remote_host_address'
}
}
}
}
If passed config is not an object, plugin will do nothing.