SecureTunnel Command Line

Last modified on September 02, 2021

Required parameters

By using the SBSecureTunnel command-line utility, you can start SecureTunnel in various configurations. In every call, you should specify these parameters:

SBSecureTunnel.exe --username your-account --authkey auth-key

  • --username is the name of your BitBar account (for example, john.smith@mycompany.com).

  • --authkey is your authentication key (also called API key).

    How to get the API key

Recommended parameters

In most cases, you will run the utility with the following parameters:

SBSecureTunnel.exe --username your-account --authkey auth-key --acceptAllCerts

This call initiates the tunnel of the Internal Websites type with the the Accept all SSL certificates and Bypass tunnel for public URLs settings enabled (for more information on them, see Tunnel Settings).

Note that the Internal Websites mode is used by default and doesn’t require any command-line argument for activation. The same is with the Bypass … setting.

Run in Proxy Server mode

To run the tunnel in the Proxy Server mode, add the --proxyIp and --proxyPort parameters to the command line:

SBSecureTunnel.exe --username your-account --authkey auth-key --proxyIp ip-address --proxyPort proxy-port-number

Run in Local HTML Files mode

Currently, BitBar doesn’t support this mode.

Bypass tunnel for public URLs

By default, the Bypass tunnel for public URLs setting is on and you don’t need to add anything to the command line to activate it.

If you need to disable the setting, add --bypass false to the command line:

SBSecureTunnel.exe --username your-account --authkey auth-key --bypass false

Accept all SSL certificates

To enable the Accept all SSL certificates setting, add --acceptAllCerts to the command line. If this parameter is absent, the setting is off:

SBSecureTunnel.exe --username your-account --authkey auth-key --acceptAllCerts

Additional options

--kill file-name

Commands the tunnel executable to monitor the specified file. Once the file appears, the tunnel executable shuts down. The file format and contents don’t matter. It can be an empty file. The SecureTunnel utility checks only the file presence. See also Using Tunnels in Automated Tests.

Note: If the file name contains spaces, enclose it in quotes.

--ready file-name

Commands the tunnel executable to create the specified file after the tunnel connection has been set up successfully (the created file is empty). Your automation framework can check the presence of this file to determine if the tunnel is ready or not. See also Using Tunnels in Automated Tests.

Note: If the file name contains spaces, enclose it in quotes.

--verbose

When this parameter is used in the command line, the SecureTunnel utility posts messages about its work to the command-line window. This diagnose issues when the tunnel fails to start. By default, the verbose mode is off.

See Also

Secure Tunnel
Using Tunnels in Automated Tests

Highlight search results