src/main/distrib/data/defaults.properties | ●●●●● patch | view | raw | blame | history | |
src/main/java/com/gitblit/manager/PluginManager.java | ●●●●● patch | view | raw | blame | history |
src/main/distrib/data/defaults.properties
@@ -572,6 +572,16 @@ # SINCE 1.5.0 plugins.registry = http://plugins.gitblit.com/plugins.json # The HTTP proxy host for plugin manager. # # SINCE 1.7.0 plugins.httpProxyHost = # The HTTP proxy port for plugin manager. # # SINCE 1.7.0 plugins.httpProxyPort = # Number of threads used to handle miscellaneous tasks in the background. # # SINCE 1.6.0 src/main/java/com/gitblit/manager/PluginManager.java
@@ -22,6 +22,7 @@ import java.io.IOException; import java.io.InputStream; import java.net.HttpURLConnection; import java.net.InetSocketAddress; import java.net.Proxy; import java.net.URL; import java.net.URLConnection; @@ -586,8 +587,15 @@ } protected Proxy getProxy(URL url) { String proxyHost = runtimeManager.getSettings().getString(Keys.plugins.httpProxyHost, ""); String proxyPort = runtimeManager.getSettings().getString(Keys.plugins.httpProxyPort, ""); if (!StringUtils.isEmpty(proxyHost) && !StringUtils.isEmpty(proxyPort)) { return new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyHost, Integer.parseInt(proxyPort))); } else { return java.net.Proxy.NO_PROXY; } } protected String getProxyAuthorization(URL url) { return "";