Environment Variables

These environment variables can be used in addition to command-line options to control the behavior of Sauce Connect Proxy. To learn how to set up environment variables, see Using Environment Variables for Authentication Credentials.

When an environment variable is used, it can still be overridden by the command-line. Command-line options โ€“ when available โ€“ always take precedence.

Some command-line arguments can be passed through a config file or an environment variable. When the same argument is passed through multiple methods, the order of precedence is as follows:

  1. Command Line Argument
  2. Config File
  3. Environment Variable
Environment VariableDescriptionPlatformsCorresponding CLI Option
SAUCE_USERNAMESets your Sauce Labs username.Windows, Linux, Mac OS X--user
SAUCE_ACCESS_KEYSets your Sauce Labs access key.Windows, Linux, Mac OS X--api-key
http_proxy

Sets an HTTP proxy to be used by Sauce Connect Proxy. It can be formatted as http://hostname:port or hostname:port.

On Linux and Mac environments, http_proxy and https_proxy variables can contain proxy credentials in the following format: scheme://user:password@host:port

Windows, Linux, Mac OS X--proxy
HTTP_PROXY
all_proxy
ALL_PROXY
no_proxySets hostnames that will not be proxied, even when Sauce Connect is configured to use a proxy. Format as a comma-separated list. Subdomain wildcarding is supported when the hostname starts with a .. Examples:
  • saucelabs.com,foobar.net: Only requests hitting saucelabs.com and foobar.net will not be proxied. All other requests will be proxied.
  • .example.com: All requests going to any subdomain of example.com will not be proxied (e.g., one.example.com, asdf.example.com)
Linux
NO_PROXY
SAUCE_ARES_FLAGSSets advanced flags for DNS library use with Sauce Connect. For more information, see c-ares Documentation.Windows, Linux, Mac OS X

NOTE: Not all environment variables are supported on all platforms. For best performance, make sure that you're using the latest version of Sauce Connect Proxy.

Additional Resources#

Last updated on by Laura Thomas