Skip to main content

Sauce Connect Proxy Environment Variables

For additional security, you can set your credentials and other command-line options (indicated below) as environment variables to control the behavior of Sauce Connect Proxy.

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 YAML 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 option
  2. Environment variable
  3. YAML config file
Environment VariableDescriptionPlatformsCorresponding CLI Option
SAUCE_USERNAMESets your Sauce Labs username.Windows, Linux, Mac--user
SAUCE_ACCESS_KEYSets your Sauce Labs access key.Windows, Linux, Mac--api-key
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--proxy
Sets hostnames that will not be proxied, even when Sauce Connect Proxy is configured to use a proxy. Format as a comma-separated list. Subdomain wildcarding is supported when the hostname starts with a . Examples:, Only requests hitting and will not be proxied. All other requests will be proxied. All requests going to any subdomain of will not be proxied (e.g.,,
SAUCE_ARES_FLAGSSets advanced flags for DNS library use with Sauce Connect Proxy. For more information, see c-ares Documentation.Windows, Linux, Mac

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.

More Information#