Skip to main content

Sauce Connect Tunnel YAML File Configuration

The standard way to launch a Sauce Connect Proxy tunnel is to execute a single command line comprised of all required flags and any optional flags you want to use to customize tunnel behavior.

Another way to launch a tunnel is to fill out our YAML config file template and then use the -c (--config-file) flag in your command line to specify the YAML file path. Instead of writing out all tunnel configuration options on your command line, you'd just modify the properties in your YAML file.

What You'll Need#

Use Cases#

We recommend using a YAML config file in production environments.

  • Facilitates tracking tunnel configuration changes because they're all included in a single YAML file.
  • Facilitates management of tunnel-domains and direct-domains options, which can get very long.
  • Secures Sauce Connect Proxy credentials with tighter access control.

Using the YAML Config File#

To launch a tunnel using our config.yml file template:

  1. Go to your Sauce Connect Proxy folder and open the config.yml template.
    Sauce Connect download file contents

  2. Enter values for the properties you'd like to use. To view the description for a YAML file property, look up the corresponding CLI flag.
    Sauce Connect download file contents Sauce Connect download file contents

  3. Save your config.yml to its original location, ~/sc-4.7.1-osx/config_examples/config.yml.

  4. From your command line, navigate to the Sauce Connect Proxy client bin folder.

    cd sc-4.7.1-osx/bin
  5. Use the following command line configuration at runtime to direct Sauce Connect Proxy to pull from your YAML configuration file.

    ./sc -u $SAUCE_USERNAME \     -k $SAUCE_ACCESS_KEY \     -c ~/sc-4.7.1-osx/config_examples/config.yml \     --region us-west \     --tunnel-name $TUNNEL_NAME

More Information#