How to Use Proxy Settings with IECTL¶
IECTL supports using system proxy settings for network communication. You can configure proxy settings by setting the appropriate environment variables. IECTL will automatically honor these settings when making network requests.
Setting Proxy Environment Variables¶
Set the following environment variables in your shell before running iectl
:
# Set HTTP proxy
export HTTP_PROXY="http://user:password@proxy-server:port"
export http_proxy="http://user:password@proxy-server:port"
# Set HTTPS proxy
export HTTPS_PROXY="https://user:password@proxy-server:port"
export https_proxy="https://user:password@proxy-server:port"
# Set NO_PROXY to exclude addresses from proxying
export NO_PROXY="localhost,127.0.0.1,example.com,192.168.1.1"
export no_proxy="localhost,127.0.0.1,example.com,192.168.1.1"
- Both uppercase and lowercase variable names are supported.
- You can set these variables in your shell profile (e.g.,
.bashrc
,.zshrc
, or Windows environment variables) or directly in your terminal session.
NO_PROXY Variable¶
The NO_PROXY
(or no_proxy
) variable specifies a comma-separated list of hosts or IP addresses that should bypass the proxy.
Supported examples:
export NO_PROXY="localhost,127.0.0.1,example.com,192.168.1.1,*.example.com"
- Hostnames (e.g.,
example.com
) - IP addresses (e.g.,
127.0.0.1
,192.168.1.1
) - Localhost
Not supported:
- CIDR notation (e.g.,
192.168.0.0/16
) is not supported by IECTL. - Wildcards (e.g.,
*
) are not supported.
Example Usage¶
export HTTP_PROXY="http://proxy.example.com:8080"
export HTTPS_PROXY="https://proxy.example.com:8443"
export NO_PROXY="localhost,127.0.0.1,example.com,192.168.1.1,*.example.com"
IECTL will use the specified proxy settings for all network requests, except for the addresses listed in NO_PROXY
.