### Start and Stop BrowserStack Local Instance Source: https://github.com/browserstack/browserstack-local-nodejs/blob/master/README.md Example of creating an instance, starting it with access key, checking its status, and stopping it. Ensure you replace '' with your actual key or set the BROWSERSTACK_ACCESS_KEY environment variable. ```javascript var browserstack = require('browserstack-local'); //creates an instance of Local var bs_local = new browserstack.Local(); // replace with your key. You can also set an environment variable - "BROWSERSTACK_ACCESS_KEY". var bs_local_args = { 'key': '' }; // starts the Local instance with the required arguments bs_local.start(bs_local_args, function() { console.log("Started BrowserStackLocal"); // check if BrowserStack local instance is running console.log(bs_local.isRunning()); // stop the Local instance bs_local.stop(function() { console.log("Stopped BrowserStackLocal"); }); }); ``` -------------------------------- ### Install BrowserStack Local Node.js Source: https://github.com/browserstack/browserstack-local-nodejs/blob/master/README.md Install the browserstack-local package using npm. ```bash npm install browserstack-local ``` -------------------------------- ### Start tunnel for folder testing Source: https://context7.com/browserstack/browserstack-local-nodejs/llms.txt Starts the BrowserStack Local tunnel to test a local folder as a static site. The path to the folder is passed to the binary via the `-f` or `--folder` flag. ```APIDOC ## bsLocal.start(options, callback) ### Description Starts the BrowserStack Local tunnel to test a local folder as a static site. The path to the folder is passed to the binary via the `-f` flag. ### Method `start` ### Parameters #### Options - **key** (string) - Required - Your BrowserStack Access Key. - **f** (string) - Required - The path to the local folder to be tested as a static site. Accepts `folder` as an alias. #### Callback - **callback** (function) - Required - Function to be called upon tunnel start or error. ``` -------------------------------- ### Start tunnel with custom binary arguments Source: https://context7.com/browserstack/browserstack-local-nodejs/llms.txt Starts the BrowserStack Local tunnel, allowing custom arguments to be passed directly to the binary. Unrecognized options are passed as `--key value` flags. `binarypath` can be used to specify a pre-installed binary. ```APIDOC ## bsLocal.start(options, callback) ### Description Starts the BrowserStack Local tunnel with custom arguments passed to the binary. Any option key not explicitly handled is passed through as a `--key value` flag to the binary. Boolean `true` values produce a bare `--flag`. Use `binarypath` to skip binary auto-download and specify a pre-installed binary. ### Method `start` ### Parameters #### Options - **key** (string) - Required - Your BrowserStack Access Key. - **binarypath** (string) - Optional - Path to a pre-installed BrowserStack Local binary to skip auto-download. - **enable-logging-for-api** (boolean) - Optional - Enables logging for the API (passed as `--enable-logging-for-api`). - **custom-timeout** (string) - Optional - Sets a custom timeout value (passed as `--custom-timeout `). - **[other custom arguments]** - Any other option key not explicitly handled will be passed as a `--key value` flag to the binary. #### Callback - **callback** (function) - Required - Function to be called upon tunnel start or error. ``` -------------------------------- ### bsLocal.startSync(options) Source: https://context7.com/browserstack/browserstack-local-nodejs/llms.txt Starts the BrowserStack Local tunnel synchronously, blocking execution until the tunnel is ready or an error occurs. This is useful in environments where asynchronous operations are less convenient. ```APIDOC ## bsLocal.startSync(options) ### Description Synchronous variant of `start`. Blocks execution until the tunnel is connected or an error occurs. Returns a `LocalError` instance on failure, or `undefined` on success. Useful in environments where async control flow is inconvenient. ### Method `startSync(options)` ### Parameters #### Options - **key** (string) - Required - Your BrowserStack access key. - **verbose** (string) - Optional - Verbose logging level (e.g., '1', '2', '3'). - **onlyAutomate** (boolean) - Optional - Disable Live/Screenshots, enable Automate only. - **force** (boolean) - Optional - Kill any other running BrowserStack Local instances. ### Returns - `LocalError` | `undefined` - An error object if the tunnel fails to start, otherwise undefined. ### Request Example ```javascript var browserstack = require('browserstack-local'); var bsLocal = new browserstack.Local(); // Synchronously start the tunnel var error = bsLocal.startSync({ key: process.env.BROWSERSTACK_ACCESS_KEY, verbose: '2', onlyAutomate: true, force: true, }); if (error) { console.error('Tunnel start failed:', error.message); process.exit(1); } console.log('Tunnel running synchronously. PID:', bsLocal.pid); // ... run sync test logic ... bsLocal.stop(function() { console.log('Stopped.'); }); ``` ``` -------------------------------- ### Start tunnel with proxy configuration Source: https://context7.com/browserstack/browserstack-local-nodejs/llms.txt Starts the BrowserStack Local tunnel, routing traffic through an HTTP proxy. This configuration is useful for environments with strict network policies. `proxyHost` is mandatory for proxy usage. ```APIDOC ## bsLocal.start(options, callback) ### Description Starts the BrowserStack Local tunnel with specified options, including proxy configuration. Routes the binary download and tunnel traffic through an HTTP proxy. `proxyHost` is required to enable proxy; other fields are optional. `useCaCertificate` loads a custom CA cert for TLS verification. ### Method `start` ### Parameters #### Options - **key** (string) - Required - Your BrowserStack Access Key. - **proxyHost** (string) - Required (if proxy is used) - The hostname or IP address of the proxy server. - **proxyPort** (string) - Optional - The port number of the proxy server. - **proxyUser** (string) - Optional - The username for proxy authentication. - **proxyPass** (string) - Optional - The password for proxy authentication. - **forceProxy** (boolean) - Optional - Forces all traffic through the proxy. - **useCaCertificate** (string) - Optional - Path to a custom CA certificate file for TLS verification. #### Callback - **callback** (function) - Required - Function to be called upon tunnel start or error. ``` -------------------------------- ### bsLocal.start(options, callback) Source: https://context7.com/browserstack/browserstack-local-nodejs/llms.txt Starts the BrowserStack Local tunnel asynchronously. It handles downloading the binary if necessary and initiates the tunnel process. A callback function is provided to handle completion or errors. ```APIDOC ## bsLocal.start(options, callback) ### Description Downloads the BrowserStack Local binary if not already present, then starts the tunnel daemon. Calls `callback(error)` on completion — `error` is undefined on success, or a `LocalError` instance on failure. Automatically retries binary download up to 9 times on failure. ### Method `start(options, callback)` ### Parameters #### Options - **key** (string) - Required - Your BrowserStack access key. - **verbose** (boolean | string) - Optional - Enable verbose logging. Can be `true` or a string representing the log level ('1', '2', '3'). - **forceLocal** (boolean) - Optional - Route all traffic via the local machine. - **localIdentifier** (string) - Optional - A unique ID for concurrent tunnels. - **logFile** (string) - Optional - Path to a custom log file. - **proxyHost** (string) - Optional - Hostname for the proxy server. - **proxyPort** (string) - Optional - Port for the proxy server. - **proxyUser** (string) - Optional - Username for proxy authentication. - **proxyPass** (string) - Optional - Password for proxy authentication. ### Callback - **error** (`LocalError` | undefined) - An error object if the tunnel fails to start, otherwise undefined. ### Request Example ```javascript var browserstack = require('browserstack-local'); var bsLocal = new browserstack.Local(); var options = { key: process.env.BROWSERSTACK_ACCESS_KEY, verbose: true, forceLocal: true, localIdentifier: 'my-tunnel-01', logFile: '/tmp/bs-local.log', // proxyHost: '127.0.0.1', // proxyPort: '8080', // proxyUser: 'user', // proxyPass: 'secret', }; bsLocal.start(options, function(error) { if (error) { console.error('Failed to start BrowserStack Local:', error.message); process.exit(1); } console.log('Tunnel started. isRunning:', bsLocal.isRunning()); // true // Run your tests here... bsLocal.stop(function() { console.log('Tunnel stopped. isRunning:', bsLocal.isRunning()); // false }); }); ``` ``` -------------------------------- ### Start BrowserStack Local tunnel asynchronously Source: https://context7.com/browserstack/browserstack-local-nodejs/llms.txt Downloads the BrowserStack Local binary if needed and starts the tunnel. The callback receives an error object on failure. Supports extensive configuration options for proxy, logging, and tunnel identification. Automatically retries binary download up to 9 times. ```javascript var browserstack = require('browserstack-local'); var bsLocal = new browserstack.Local(); var options = { key: process.env.BROWSERSTACK_ACCESS_KEY, // or pass directly as a string verbose: true, // enable verbose logging (levels: true/'1', '2', '3') forceLocal: true, // route all traffic via local machine localIdentifier: 'my-tunnel-01', // unique ID for concurrent tunnels logFile: '/tmp/bs-local.log', // custom log file path // proxyHost: '127.0.0.1', // proxyPort: '8080', // proxyUser: 'user', // proxyPass: 'secret', }; bsLocal.start(options, function(error) { if (error) { console.error('Failed to start BrowserStack Local:', error.message); process.exit(1); } console.log('Tunnel started. isRunning:', bsLocal.isRunning()); // true // Run your tests here... bsLocal.stop(function() { console.log('Tunnel stopped. isRunning:', bsLocal.isRunning()); // false }); }); ``` -------------------------------- ### Force Start BrowserStack Local Source: https://github.com/browserstack/browserstack-local-nodejs/blob/master/README.md Use the 'force' option to kill any other running BrowserStack Local instances before starting a new one. ```javascript bs_local_args = { 'key': '', 'force': 'true' } ``` -------------------------------- ### Start BrowserStack Local tunnel synchronously Source: https://context7.com/browserstack/browserstack-local-nodejs/llms.txt A synchronous variant of `start` that blocks execution until the tunnel is connected or an error occurs. Returns a `LocalError` on failure or `undefined` on success. Useful for environments where asynchronous control flow is difficult. ```javascript var browserstack = require('browserstack-local'); var bsLocal = new browserstack.Local(); // Synchronously start the tunnel var error = bsLocal.startSync({ key: process.env.BROWSERSTACK_ACCESS_KEY, verbose: '2', // verbose level 2 onlyAutomate: true, // disable Live/Screenshots, enable Automate only force: true, // kill any other running BrowserStack Local instances }); if (error) { console.error('Tunnel start failed:', error.message); process.exit(1); } console.log('Tunnel running synchronously. PID:', bsLocal.pid); // ... run sync test logic ... bsLocal.stop(function() { console.log('Stopped.'); }); ``` -------------------------------- ### Start tunnel with parallel runs and local identifiers Source: https://context7.com/browserstack/browserstack-local-nodejs/llms.txt Starts multiple simultaneous BrowserStack Local tunnels, each assigned a unique `localIdentifier`. This is used for parallel testing, ensuring the Automate capability `browserstack.localIdentifier` matches. ```APIDOC ## bsLocal.start(options, callback) ### Description Starts multiple simultaneous Local tunnels by assigning each a unique `localIdentifier`. The corresponding Automate capability `browserstack.localIdentifier` must match. ### Method `start` ### Parameters #### Options - **key** (string) - Required - Your BrowserStack Access Key. - **localIdentifier** (string) - Required - A unique identifier for the tunnel session, used for parallel runs. - **parallelRuns** (string) - Optional - The number of parallel runs to support for this tunnel. #### Callback - **callback** (function) - Required - Function to be called upon tunnel start or error. ``` -------------------------------- ### Start BrowserStack Local Tunnel and Run Selenium Test Source: https://context7.com/browserstack/browserstack-local-nodejs/llms.txt Initiates a BrowserStack Local tunnel and then executes a Selenium WebDriver test against a local application. Ensure BROWSERSTACK_ACCESS_KEY and BROWSERSTACK_USERNAME environment variables are set. ```javascript var browserstack = require('browserstack-local'); var webdriver = require('selenium-webdriver'); var bsLocal = new browserstack.Local(); bsLocal.start({ key: process.env.BROWSERSTACK_ACCESS_KEY }, function(err) { if (err) { console.error('Local start failed:', err); process.exit(1); } console.log('BrowserStack tunnel active:', bsLocal.isRunning()); // true var capabilities = { 'browserName': 'Chrome', 'os': 'Windows', 'os_version': '10', 'browserstack.user': process.env.BROWSERSTACK_USERNAME, 'browserstack.key': process.env.BROWSERSTACK_ACCESS_KEY, 'browserstack.local': true, // must be true to use tunnel 'build': 'local-test-build-1', 'name': 'Homepage test' }; var driver = new webdriver.Builder() .usingServer('https://hub-cloud.browserstack.com/wd/hub') .withCapabilities(capabilities) .build(); driver.get('http://localhost:3000').then(function() { return driver.getTitle(); }).then(function(title) { console.log('Page title:', title); return driver.quit(); }).then(function() { bsLocal.stop(function() { console.log('All done. Tunnel stopped:', !bsLocal.isRunning()); }); }).catch(function(e) { console.error('Test failed:', e); driver.quit().then(function() { bsLocal.stop(function() { process.exit(1); }); }); }); }); ``` -------------------------------- ### Stop BrowserStack Local Tunnel Source: https://context7.com/browserstack/browserstack-local-nodejs/llms.txt Terminates the BrowserStack Local tunnel process. Safe to call even if the tunnel was never started. The callback is invoked upon completion. ```javascript bsLocal.start({ key: process.env.BROWSERSTACK_ACCESS_KEY }, function(err) { if (err) throw err; // ... run tests ... bsLocal.stop(function(stopError) { if (stopError) { console.error('Error stopping tunnel:', stopError.message); } else { console.log('Tunnel stopped successfully.'); console.log('isRunning:', bsLocal.isRunning()); // false } }); }); ``` -------------------------------- ### Stop the tunnel Source: https://context7.com/browserstack/browserstack-local-nodejs/llms.txt Terminates the BrowserStack Local tunnel process. This method is safe to call even if the tunnel was never started. It accepts a callback function that is executed upon completion. ```APIDOC ## bsLocal.stop(callback) ### Description Terminates the BrowserStack Local tunnel process (and all child processes) using `SIGTERM` via `tree-kill`. Calls `callback()` when done. Safe to call even if the tunnel was never started. ### Method `stop` ### Parameters #### Callback - **callback** (function) - Required - Function to be called when the tunnel has stopped. ``` -------------------------------- ### Custom Binary Arguments for BrowserStack Local Source: https://context7.com/browserstack/browserstack-local-nodejs/llms.txt Passes unhandled options as `--key value` flags to the binary. Boolean `true` values produce a bare `--flag`. Use `binarypath` to specify a pre-installed binary. ```javascript var bsLocal = new browserstack.Local(); bsLocal.start({ key: process.env.BROWSERSTACK_ACCESS_KEY, binarypath: '/usr/local/bin/BrowserStackLocal', // skip auto-download 'enable-logging-for-api': true, // arbitrary boolean flag → --enable-logging-for-api 'custom-timeout': '30', // arbitrary key-value → --custom-timeout 30 }, function(err) { if (err) return console.error(err.message); console.log('Custom binary started. isRunning:', bsLocal.isRunning()); bsLocal.stop(function() { console.log('Stopped.'); }); }); ``` -------------------------------- ### Configure Proxy for BrowserStack Local Source: https://github.com/browserstack/browserstack-local-nodejs/blob/master/README.md Set up proxy settings for BrowserStack Local, including host, port, user, password, and CA certificate path. ```javascript bs_local_args = { 'key': '', 'proxyHost': '127.0.0.1', 'proxyPort': '8000', 'proxyUser': 'user', 'proxyPass': 'password', 'useCaCertificate': '/Users/test/cert.pem' } ``` -------------------------------- ### Configure Folder Testing for BrowserStack Local Source: https://github.com/browserstack/browserstack-local-nodejs/blob/master/README.md Set up BrowserStack Local to test a local folder instead of an internal server by providing the folder path. ```javascript bs_local_args = { 'key': '', 'f': '/my/awesome/folder' } ``` -------------------------------- ### Test Local Folder with BrowserStack Local Source: https://context7.com/browserstack/browserstack-local-nodejs/llms.txt Tests a local folder as a static site rather than a running server. The path to the folder is passed to the binary via the `-f` flag. ```javascript var bsLocal = new browserstack.Local(); bsLocal.start({ key: process.env.BROWSERSTACK_ACCESS_KEY, f: '/var/www/my-local-site', // also accepts: folder: '/var/www/my-local-site' }, function(err) { if (err) return console.error(err.message); console.log('Folder testing tunnel active. isRunning:', bsLocal.isRunning()); bsLocal.stop(function() { console.log('Stopped.'); }); }); ``` -------------------------------- ### Configure PAC File for BrowserStack Local Source: https://github.com/browserstack/browserstack-local-nodejs/blob/master/README.md Use a PAC (Proxy Auto-Configuration) file for local testing by providing its absolute path. ```javascript bs_local_args = { 'key': '', 'pac-file': '' } ``` -------------------------------- ### Configure Local Proxy for BrowserStack Local Source: https://github.com/browserstack/browserstack-local-nodejs/blob/master/README.md Configure a local proxy for BrowserStack Local testing, specifying host, port, username, and password. ```javascript bs_local_args = { 'key': '', 'localProxyHost': '127.0.0.1', 'localProxyPort': '8000', 'localProxyUser': 'user', 'localProxyPass': 'password' } ``` -------------------------------- ### new browserstack.Local() Source: https://context7.com/browserstack/browserstack-local-nodejs/llms.txt Instantiates a new BrowserStack Local tunnel object. It reads the access key from the environment and sets up the internal state. Multiple instances can be created to manage concurrent tunnels using distinct local identifiers. ```APIDOC ## new browserstack.Local() ### Description Instantiates a new `Local` object. The constructor reads `BROWSERSTACK_ACCESS_KEY` from the environment as a default key and sets up internal state. Multiple instances can run simultaneously using different `localIdentifier` values. ### Method Constructor ### Code Example ```javascript var browserstack = require('browserstack-local'); // Create a new tunnel instance var bsLocal = new browserstack.Local(); // At this point bsLocal.isRunning() === false console.log('Is running:', bsLocal.isRunning()); // false ``` ``` -------------------------------- ### Specify Binary Path for BrowserStack Local Source: https://github.com/browserstack/browserstack-local-nodejs/blob/master/README.md Override the default download location for the BrowserStack binary by providing a custom path. ```javascript bs_local_args = { 'key': '', 'binarypath': '/browserstack/BrowserStackLocal' } ``` -------------------------------- ### Configure Log File for BrowserStack Local Source: https://github.com/browserstack/browserstack-local-nodejs/blob/master/README.md Specify a path for the log file when running with verbose logging. By default, logs are saved to 'local.log'. ```javascript bs_local_args = { 'key': '', 'verbose': 'true', 'logFile': '/browserstack/logs.txt' } ``` -------------------------------- ### Enable Verbose Logging for BrowserStack Local Source: https://github.com/browserstack/browserstack-local-nodejs/blob/master/README.md Configure verbose logging for the BrowserStack Local instance. Possible values for 'verbose' are '1', '2', '3', and 'true'. ```javascript bs_local_args = { 'key': '', 'verbose': 'true' } ``` -------------------------------- ### Configure Proxy for BrowserStack Local Tunnel Source: https://context7.com/browserstack/browserstack-local-nodejs/llms.txt Routes binary download and tunnel traffic through an HTTP proxy. `proxyHost` is required. `useCaCertificate` loads a custom CA cert for TLS verification. ```javascript var bsLocal = new browserstack.Local(); bsLocal.start({ key: process.env.BROWSERSTACK_ACCESS_KEY, proxyHost: '127.0.0.1', proxyPort: '8080', proxyUser: 'proxyuser', proxyPass: 'proxypass', forceProxy: true, // force all traffic through proxy useCaCertificate: '/etc/ssl/my-ca.pem', // custom CA certificate }, function(err) { if (err) return console.error('Error:', err.message); console.log('Tunnel started via proxy. isRunning:', bsLocal.isRunning()); bsLocal.stop(function() { console.log('Done.'); }); }); ``` -------------------------------- ### Create a new BrowserStack Local tunnel instance Source: https://context7.com/browserstack/browserstack-local-nodejs/llms.txt Instantiates a new `Local` object. The constructor reads `BROWSERSTACK_ACCESS_KEY` from the environment by default. Multiple instances can run concurrently with different `localIdentifier` values. ```javascript var browserstack = require('browserstack-local'); // Create a new tunnel instance var bsLocal = new browserstack.Local(); // At this point bsLocal.isRunning() === false console.log('Is running:', bsLocal.isRunning()); // false ``` -------------------------------- ### bsLocal.isRunning() Source: https://context7.com/browserstack/browserstack-local-nodejs/llms.txt Checks the current status of the BrowserStack Local tunnel. It returns `true` if the tunnel process is active and connected, and `false` otherwise. ```APIDOC ## bsLocal.isRunning() ### Description Returns `true` if the tunnel process is alive and connected, `false` otherwise. Checks both the stored PID and whether the OS process is actually running via `is-running`. ### Method `isRunning()` ### Returns - `boolean` - `true` if the tunnel is running, `false` otherwise. ### Request Example ```javascript var browserstack = require('browserstack-local'); var bsLocal = new browserstack.Local(); console.log(bsLocal.isRunning()); // false — not started yet bsLocal.start({ key: process.env.BROWSERSTACK_ACCESS_KEY }, function(err) { if (err) throw err; console.log(bsLocal.isRunning()); // true — tunnel is up bsLocal.stop(function() { console.log(bsLocal.isRunning()); // false — tunnel stopped }); }); ``` ``` -------------------------------- ### Enable Only Automate for BrowserStack Local Source: https://github.com/browserstack/browserstack-local-nodejs/blob/master/README.md Configure BrowserStack Local to disable testing for Live and Screenshots, enabling only Automate. ```javascript bs_local_args = { 'key': '', 'onlyAutomate': 'true' } ``` -------------------------------- ### Parallel BrowserStack Local Tunnels with Identifiers Source: https://context7.com/browserstack/browserstack-local-nodejs/llms.txt Runs multiple simultaneous Local tunnels by assigning each a unique `localIdentifier`. The corresponding Automate capability `browserstack.localIdentifier` must match. ```javascript var browserstack = require('browserstack-local'); // Tunnel 1 var tunnel1 = new browserstack.Local(); tunnel1.start({ key: process.env.BROWSERSTACK_ACCESS_KEY, localIdentifier: 'tunnel-session-A', parallelRuns: '5', }, function(err) { if (err) throw err; console.log('Tunnel A running:', tunnel1.isRunning()); }); // Tunnel 2 — independent, concurrent var tunnel2 = new browserstack.Local(); tunnel2.start({ key: process.env.BROWSERSTACK_ACCESS_KEY, localIdentifier: 'tunnel-session-B', }, function(err) { if (err) throw err; console.log('Tunnel B running:', tunnel2.isRunning()); }); ``` -------------------------------- ### Force Local Traffic Routing Source: https://github.com/browserstack/browserstack-local-nodejs/blob/master/README.md Configure BrowserStack Local to route all traffic through your local machine using the 'forceLocal' option. ```javascript bs_local_args = { 'key': '', 'forceLocal': 'true' } ``` -------------------------------- ### Set Local Identifier for BrowserStack Local Source: https://github.com/browserstack/browserstack-local-nodejs/blob/master/README.md Assign a unique 'localIdentifier' when performing simultaneous multiple local testing connections. ```javascript bs_local_args = { 'key': '', 'localIdentifier': 'randomstring' } ``` -------------------------------- ### bsLocal.stop() Source: https://context7.com/browserstack/browserstack-local-nodejs/llms.txt Terminates the BrowserStack Local tunnel process gracefully. This method should be called when testing is complete to clean up resources. ```APIDOC ## bsLocal.stop() ### Description Terminates the BrowserStack Local tunnel process gracefully. This method should be called when testing is complete to clean up resources. ### Method `stop(callback)` ### Callback - **error** (`Error` | undefined) - An error object if the tunnel fails to stop, otherwise undefined. ### Request Example ```javascript var browserstack = require('browserstack-local'); var bsLocal = new browserstack.Local(); bsLocal.start({ key: process.env.BROWSERSTACK_ACCESS_KEY }, function(err) { if (err) throw err; console.log('Tunnel is running. Stopping now...'); bsLocal.stop(function() { console.log('Tunnel stopped.'); }); }); ``` ``` -------------------------------- ### Check BrowserStack Local tunnel status Source: https://context7.com/browserstack/browserstack-local-nodejs/llms.txt Returns `true` if the tunnel process is running and connected, `false` otherwise. This check verifies both the stored PID and the actual OS process status. ```javascript var bsLocal = new browserstack.Local(); console.log(bsLocal.isRunning()); // false — not started yet bsLocal.start({ key: process.env.BROWSERSTACK_ACCESS_KEY }, function(err) { if (err) throw err; console.log(bsLocal.isRunning()); // true — tunnel is up bsLocal.stop(function() { console.log(bsLocal.isRunning()); // false — tunnel stopped }); }); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.