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
http_proxy
HTTP_PROXY
all_proxy
ALL_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--proxy
no_proxy
NO_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:

saucelabs.com,spam.net: Only requests hitting saucelabs.com and spam.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
SAUCE_ARES_FLAGSSets advanced flags for DNS library use with Sauce Connect Proxy. For more information, see c-ares Documentation.Windows, Linux, Mac
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.

More Information#