flutter设置代理引入插件

Running "flutter packages get" in flutter_app...                                                                  

Got socket error trying to find package ****** at https://pub.dartlang.org.

或 在终端输入 :curl google.com

出现:curl: (7) Failed to connect to google.com port 80: Timed out

解决方法:

终端输入

set http_proxy=127.0.0.1:1080

set https_proxy=127.0.0.1:1080

然后终端输入

curl google.com

显示


301 Moved

301 Moved


The document has moved
here.

就ok

 

你可能感兴趣的:(flutter设置代理引入插件)