如何在代理后面的 Powershell 中使用 Flutter?

How to use Flutter in Powershell behind a proxy?

我曾尝试使用 Flutter 命令行从我学习的大学计算机上下载 Pub 包,但是,因为它对用户使用代理,虽然我拥有它,但仍然使用页面上指定的步骤从 Troubleshooting pub,我总是得到以下错误:

pub get failed (69)

无论我定义多少环境变量:

http_proxy="http://username:password@address:port"
HTTP_PROXY="http://username:password@address:port"
or
https_proxy="http://username:password@address:port"
HTTPS_PROXY="http://username:password@address:port"

那没用。

我的 OS 是 Windows 10.

从 var 中删除协议,当你得到 "Proxy failed to establish tunnel 407 Proxy Authentication Required" 时,只需在你的 jvm 选项中添加 jdk.http.auth.tunneling.disabledSchemes=$JAVA_HOME/jre/lib/net.properties 中的默认值)。