Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/282.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Playframework 在play framework中更改代理设置_Playframework_Proxy_Playframework 2.3_Typesafe Activator_Typesafe - Fatal编程技术网

Playframework 在play framework中更改代理设置

Playframework 在play framework中更改代理设置,playframework,proxy,playframework-2.3,typesafe-activator,typesafe,Playframework,Proxy,Playframework 2.3,Typesafe Activator,Typesafe,当我设置play framework时,我在一个代理后面。 我编辑了~/.activator/activatorconfig.txt文件,效果很好 现在我需要删除该代理才能在不同的网络上工作。我注释掉了这一行,但是当我运行./activator new(或./activator ui)时,activator脚本仍然尝试使用代理进行连接。 文件当前看起来像这样 # This are the proxy settings we use for activator # Multiple proxy h

当我设置play framework时,我在一个代理后面。 我编辑了~/.activator/activatorconfig.txt文件,效果很好

现在我需要删除该代理才能在不同的网络上工作。我注释掉了这一行,但是当我运行./activator new(或./activator ui)时,activator脚本仍然尝试使用代理进行连接。 文件当前看起来像这样

# 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时,浏览器会打开,但请求从未完成。这是因为代理还是其他原因

我是这个框架的新手,任何帮助或提示都会很好吗

提前谢谢


PS:从终端连接互联网很好。

尝试了很多可能的组合,我实际上可以找到一个非标准的解决方案:

    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://

中typesafe文档中的“Re-Launching Activator Behind A Proxy”描述对我不起作用(可能是我的ubuntu系统缺少一些配置)

使用activator-1.3.5-minimal,java版本“1.8.0_51”,Ubuntu 14.04 LTS


ReneX

在activator.bat中,首先是@echo off下面的所有代码:

set HTTP_PROXY=http://host:port
set HTTPS_PROXY=https://host:port
set HTTP_PROXY_USER=user
set HTTP_PROXY_PASSWORD=password
几天后,我设法让它工作起来。。。费力(2.5.X版)