Using a proxy with Maestro CLI

How to configure system environment variables that Maestro CLI can read to enable it to use a proxy server when it needs to connect to the internet.

Lots of corporate environments require use of proxy server for internet traffic for security purposes. Some technically-minded folks prefer a proxy in their own home. Configuring Maestro CLI to use a proxy server is done through environment variables.

Environment Variables

You configure proxy options through either of 2 variables:

  • JAVA_OPTS - Used by all Java (or JVM-based) applications on the system. This is useful when you might have more than one application with this need, and you only want to configure it once.

  • MAESTRO_OPTS - Exactly the same format, but applies only to Maestro, not to other application. This is useful when you might have specific configurations already in JAVA_OPTS, or you're worried about breaking another JVM-based application

Variable Settings

Using a System Proxy

To use a system proxy, set the value of the environment variable like this:

MAESTRO_OPTS="-Djava.net.useSystemProxies=true"

Using a Custom Proxy

To use a custom proxy, set the environment variable with the host and port of the server to connect to:

MAESTRO_OPTS="-Dhttps.proxyHost=myproxy.com -Dhttps.proxyPort=8080"

Configuring Variables

This section covers how to set the variables on different operating systems, and for different lengths of time.

Single use configuration

For a single command

Until you close this terminal window

Permanent configuration

To permanently add the environment variable to your .zshrc for all future shell sessions:

Last updated