使用代理
¥Using a Proxy
代理支持内置于 Ionic CLI 中。代理设置可以通过配置文件或环境变量进行配置。
¥Proxy support is built-in to the Ionic CLI. Proxy settings can be configured via the config file or an environment variable.
要通过配置文件配置代理设置,请使用代理服务器的 URL 运行以下命令:
¥To configure proxy settings via the config file, run the following with the URL of the proxy server:
ionic config set -g proxy http://proxy.example.com:8888
要通过环境变量配置代理设置,请使用以下选项之一:
¥To configure proxy settings via an environment variable, use one of the following:
$ export HTTP_PROXY="http://proxy.example.com:8888" # also used by npm
$ export HTTPS_PROXY="https://proxy.example.com:8888" # also used by npm
$ export IONIC_HTTP_PROXY="http://proxy.example.com:8888"
其他 CLI
¥Other CLIs