Help Center/ Object Storage Service/ Tools Guide/ obsutil/ Best Practices/ Configuring an HTTP Proxy for obsutil
Updated on 2026-07-29 GMT+08:00

Configuring an HTTP Proxy for obsutil

You can configure an HTTP proxy in any of the following ways:

Method 1: Set the proxyUrl parameter in the .obsutilconfig file, for example, proxyUrl=http://username:password@your-proxy:8080.

Method 2: Use the system environment variable HTTPS_PROXY or HTTP_PROXY, for example, HTTPS_PROXY=http://username:password@your-proxy:8080.

Method 3: Use the command line parameter -proxy-url, for example, obsutil ls -proxy-url=http://username:password@your-proxy:8080.

  • HTTP proxy format: http://[Username:Password@]Proxy server address:Port number. The Username and Password are optional.
  • Method 3 has the highest priority, followed by Method 1 and then Method 2.
  • The user name and password cannot contain colons (:) and at signs (@), which will result in parsing errors.

How Do I Configure no-proxy?

You can configure a proxy whitelist in any of the following ways:

Method 1: Set the noProxyUrl parameter in the .obsutilconfig file. Example: noProxyUrl=*.obs.myhuaweicloud.com

Method 2: Use the system environment variable NO_PROXY. Example: HTTPS_PROXY=*.obs.myhuaweicloud.com

Method 3: Use the command line parameter -no-proxy-url. Example: obsutil ls -no-proxy-url=http://username:password@your-proxy:8080

  • Method 1 only takes effect when proxyUrl is configured. Otherwise, the configuration is obtained from the system environment variable by default.
  • Method 3 has the highest priority, followed by Method 1 and then Method 2.
  • This function only supports no-proxy in version 5.5.9 or later.
  • In version 5.5.9, the proxyFormEnv parameter is added to control whether to obtain the proxy configuration from system variables, including http(s)_proxy and no_proxy.
  • In version 5.8.3, the command line parameters proxy-url and -no-proxy-url are added to specify the proxy address and proxy whitelist.