Contact Us 1-800-596-4880

Using Anypoint CLI with a Network Proxy

Anypoint CLI can be run through a network proxy to add a layer of security. To use the Anypoint CLI with a proxy server, configure the HTTP_PROXY or HTTPS_PROXY environment variables with the hostname or IP addresses of your proxy servers as shown in the following sections. Use the ANYPOINT_CERTIFICATE variable to configure your trusted certificates required by proxy.

Configure a Proxy Server Without Authentication

To configure a proxy server that does not require authentication, use the following commands:

  • Linux, macOS, or Unix

    $ export HTTP_PROXY=http://proxy-server:80

    or

    $ export HTTPS_PROXY=https://proxy-server:443

  • Windows

    > set HTTP_PROXY=http://proxy-server:80

    or

    > set HTTPS_PROXY=https//proxy-server:443

Configure a Proxy Server With Authentication

To configure a proxy server that requires authentication, use these commands:

  • Linux, macOS, or Unix

    $ export HTTP_PROXY=http://username:password@proxy-server:80

    or

    $ export HTTPS_PROXY=https://username:password@proxy-server:443

  • Windows

    > set HTTP_PROXY=http://username:password@proxy-server:80

    or

    > set HTTPS_PROXY=https://username:password@proxy-server:443