Dart编辑器中的网络连接代理 [英] Network Connection Proxies in Dart Editor

查看:187
本文介绍了Dart编辑器中的网络连接代理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Eclipse在其首选项中有一个网络连接页面,允许使用代理进行网络连接,因此如果我在防火墙后面,可以使用这些连接。我在Dart编辑器中没有看到任何这样的选项。所以,虽然我在工作,我不能从网络更新因为这个。我可以在浏览器中设置代理,但不能在Dart编辑器中。与ISP直接连接,一切正常,但不是从内部网络。

Eclipse has a "Network Connections" page in its preferences that allows one to use proxies for network connections, so if I am behind a firewall I can use these connections. I don't see any such option in the Dart Editor. So, while I am at work, I cannot update from the network because of this. I can set the proxy in a browser, but not in Dart Editor. With a direct connection to an ISP, everything is okay, but not from an internal network.

有没有办法解决这个问题?如果有另一种方法允许Dart编辑器连接到网络代理,我会很高兴。

Is there some way to fix this issue? If there is another way to allow the Dart Editor to connect to a network proxy I would be pleased.

推荐答案

环境变量

https://www.dartlang.org/tools/editor/troubleshoot.html#pub-get-firewall

http_proxy=http://<yourproxy>.<yourdomain>.com:9090/
https_proxy=https://<yourproxy>.<yourdomain>.com:9090/
no_proxy=localhost,127.0.0.0/8

如果您的代理需要身份验证,如下所示:

If your proxy needs authentication, the setup will look more like the following:

http_proxy=http://<username>:<password>@<yourproxy>.<yourdomain>.com:9090/
https_proxy=https://<username>:<password>@<yourproxy>.<yourdomain>.com:9090/

要启用Dart Editor检查更新,请将以下内容添加到DartEditor.ini文件中:

To enable Dart Editor to check for updates, add the following to the DartEditor.ini file:

-Dhttp.proxyHost=<yourproxy>.<yourdomain>.com
-Dhttp.proxyPort=9090
-Dhttps.proxyHost=<yourproxy>.<yourdomain>.com
-Dhttps.proxyPort=9090

您需要一个用户名和密码进行身份验证,请添加:

If you need a user name and password for authentication, add:

-Dhttp.proxyUser=<username>
-Dhttp.proxyPassword=<passwordstring>
-Dhttps.proxyUser=<username>
-Dhttps.proxyPassword=<passwordstring>

另请参阅 https://github.com/dart-lang/sdk/issues/24080

这篇关于Dart编辑器中的网络连接代理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆