Merge pull request #2170 from balena-io/tunnel-help-openbalena

tunnel: Add note re openBalena version compatibility
This commit is contained in:
bulldozer-balena[bot] 2021-01-26 08:29:29 +00:00 committed by GitHub
commit 492bdab2fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 12 deletions

View File

@ -1830,17 +1830,25 @@ bypass global proxy configuration for the ssh connection
## tunnel <deviceOrApplication>
Use this command to open local ports which tunnel to listening ports on your balenaOS device.
Use this command to open local TCP ports that tunnel to listening sockets in a
balenaOS device.
For example, you could open port 8080 on your local machine to connect to your managed balenaOS
device running a web server listening on port 3000.
For example, this command could be used to expose the ssh server of a balenaOS
device (port number 22222) on the local machine, or to expose a web server
running on the device. The port numbers do not have be the same between the
device and the local machine, and multiple ports may be tunneled in a single
command line.
Port mappings are specified in the format: <remotePort>[:[localIP:]localPort]
localIP defaults to 'localhost', and localPort defaults to the specified remotePort value.
localIP defaults to 'localhost', and localPort defaults to the specified
remotePort value.
You can tunnel multiple ports at any given time.
Note: the -p (--port) flag must be provided at the end of the command line,
as per examples.
Note: Port mappings must come after the deviceOrApplication parameter, as per examples.
In the case of openBalena, the tunnel command in CLI v12.38.5 or later requires
openBalena v3.1.2 or later. Older CLI versions work with older openBalena
versions.
Examples:

View File

@ -39,17 +39,25 @@ export default class TunnelCmd extends Command {
public static description = stripIndent`
Tunnel local ports to your balenaOS device.
Use this command to open local ports which tunnel to listening ports on your balenaOS device.
Use this command to open local TCP ports that tunnel to listening sockets in a
balenaOS device.
For example, you could open port 8080 on your local machine to connect to your managed balenaOS
device running a web server listening on port 3000.
For example, this command could be used to expose the ssh server of a balenaOS
device (port number 22222) on the local machine, or to expose a web server
running on the device. The port numbers do not have be the same between the
device and the local machine, and multiple ports may be tunneled in a single
command line.
Port mappings are specified in the format: <remotePort>[:[localIP:]localPort]
localIP defaults to 'localhost', and localPort defaults to the specified remotePort value.
localIP defaults to 'localhost', and localPort defaults to the specified
remotePort value.
You can tunnel multiple ports at any given time.
Note: the -p (--port) flag must be provided at the end of the command line,
as per examples.
Note: Port mappings must come after the deviceOrApplication parameter, as per examples.
In the case of openBalena, the tunnel command in CLI v12.38.5 or later requires
openBalena v3.1.2 or later. Older CLI versions work with older openBalena
versions.
`;
public static examples = [