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.
Config file may contain any Sauce Connect Proxy CLI flag. It may also contain comments that could help make its content more readable, for example:
# this is my log file for SC I use for Mac OS tests.
# this is the tunnel I use for Mac OS tests
It's possible to pass the same command-line arguments on the command line, through a YAML config file, and as environment variables. When the same argument is passed through multiple methods, the order of precedence is as follows (from highest to lowest): command-line option, environment variable, YAML config file.
For the reference, below is the complete config file that contains the latest Sauce Connect Proxy version defaults. To view the description for a YAML file property, look up the corresponding CLI flag.
$ cat /sc-4.8.0-osx/config_examples/config.yml
You can find a complete configuration file example in the extracted .zip file content in
config_examples folder (see the download instructions).
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 potentially long CLI options such as tunnel-domains and direct-domains.
- Secures Sauce Connect Proxy credentials with tighter access control.
What You'll Need
Using the YAML Config File
To launch a tunnel using a config.yml file option.
Create Sauce Connect Proxy config file in any location, for example:
Enter values for the properties you'd like to use.
Navigate to the Sauce Connect Proxy client bin folder as described here.
Use the following command line to start Sauce Connect Proxy with the configuration from your YAML file.
./sc -c ~/sc/config.yml
sc -c %HOMEPATH%\sc\config.yml