Use a proxy with the host-agentedit

In some cases, your infrastructure host-agent installation needs to use an HTTP proxy to reach Elastic Cloud. In these cases, you can use the HTTPS_PROXY environment variable to configure a proxy used by the host-agent. The connection to the backend (Elastic Cloud) will be tunneled through the proxy (no MITM-TLS) using the CONNECT method. Basic authentication is supported. This can be useful in environments with security policies or network restrictions that block direct connections to outside hosts.

You need to set the HTTPS_PROXY environment variable in the machines that will run the host-agents. If you set the environment variable after the host-agent is installed, you may need to reinstall the host-agent.

The following example shows how to use the HTTPS_PROXY environment variable:

export HTTPS_PROXY=http://username:password@proxy:port