Configure proxy settings

更新时间:
复制 MD 格式

This topic describes how to configure a proxy server in Alibaba Cloud CLI to access and manage cloud services through the proxy.

Procedure

Alibaba Cloud CLI allows you to use a proxy server to access and manage cloud services by configuring environment variables. The following table describes the configuration. For more information about how to configure environment variables, see Configure environment variables in Linux, macOS, and Windows.

Use an HTTP proxy

Variable

Value

http_proxy

  • Format: http://proxy_server_address:port

  • Examples:

    • http://192.168.1.2:1234

    • http://proxy.example.com:1234

Use an HTTPS proxy

Variable

Value

HTTPS_PROXY or https_proxy

The CLI reads HTTPS_PROXY first and falls back to https_proxy.

  • Format: https://proxy_server_address:port

  • Examples:

    • https://192.168.1.2:5678

    • https://proxy.example.com:5678

Skip TLS certificate validation

If a corporate proxy uses a self-signed certificate for TLS interception, CLI returns a certificate validation error. You can use the --skip-secure-verify flag to skip certificate validation:

aliyun ecs describe-regions --skip-secure-verify

To persist this setting, run configure set:

aliyun configure set --skip-secure-verify

After the configuration is complete, you can run any API command to verify proxy connectivity.

Warning

Skipping TLS certificate validation reduces security. Use this option only in trusted internal networks. On public networks, this may expose your credentials.