问题描述
当我设置播放框架时,我在代理后面.我编辑了 ~/.activator/activatorconfig.txt 文件,它运行良好.
I was behind a proxy when I setup play framework.I edited the ~/.activator/activatorconfig.txt file and it worked fine.
现在我需要删除该代理才能在不同的网络上工作.我注释掉了这一行,但是当我运行 ./activator new(或 ./activator ui)时,激活器脚本仍然尝试使用代理进行连接.该文件目前看起来像这样
Now I need to remove that proxy to work on a different network. I commented out the line but the activator script still tries to use the proxy for connection, when I run ./activator new (or ./activator ui).The file currently looks like this
# This are the proxy settings we use for activator
# Multiple proxy hosts can be used by separating them with a '|' sign
# Do not enclose the proxy host(s) in quotes
#-Dhttp.proxyHost=10.10.78.22
#-Dhttp.proxyPort=3128
# Here we configure the hosts which should not go through the proxy.# You should include your private network, if applicable.
-Dhttp.nonProxyHosts="localhost|127.0.0.1"
# These are commented out, but if you need to use authentication for your proxy, please fill these out.
#-Dhttp.proxyUser=(my_username)
#-Dhttp.proxyPassword=(my_password)
此外,当我从之前创建的项目的根目录运行 ./activator 时,浏览器会打开但请求从未完成.是因为代理还是其他什么原因?
Also when I run ./activator from the root directory of a previously created project, the browser opens but the request never gets completed. Is that because of the proxy or some other reason?
我是这个框架的新手,有什么帮助或提示会很好吗?
I am new to this framework and any help or tips would be great?
提前致谢
PS:来自终端的互联网连接工作正常.
PS: Internet connection from terminal works fine.
推荐答案
尝试了很多可能的组合,我实际上可以找到一个非标准的解决方案:
trying lots of possible combinations I could actually find a non standard solution:
activator -Dhttp.proxyHost="your proxyname" -Dhttp.proxyPort="your port" -Dhttps.proxyHost="your proxyname" -Dhttps.proxyPort="your port" -Dhttp.nonProxyHosts="localhost|127.0.0.1" ~run
请注意,在您的代理名称"中,您不必包含 http://或 https://
Notice that in "your proxyname" you do not have to include http:// nor https://
https://www.typesafe 中的类型安全文档中的在代理后面重新启动激活器"描述.com/activator/docs 对我不起作用(可能是我的 ubuntu 系统中缺少一些配置).
The "Re-Launching Activator Behind A Proxy" description from typesafe documentation in https://www.typesafe.com/activator/docs doesn't work for me (may be I have some missing configuration in my ubuntu system).
使用 activator-1.3.5-minimal,Java 版本1.8.0_51",Ubuntu 14.04 LTS
Using activator-1.3.5-minimal, java version "1.8.0_51", Ubuntu 14.04 LTS
ReneX
这篇关于在播放框架中更改代理设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!