diff --git a/src/main/scala/gitbucket/core/plugin/PluginRegistry.scala b/src/main/scala/gitbucket/core/plugin/PluginRegistry.scala index 6ed9dbc..6964732 100644 --- a/src/main/scala/gitbucket/core/plugin/PluginRegistry.scala +++ b/src/main/scala/gitbucket/core/plugin/PluginRegistry.scala @@ -255,7 +255,7 @@ }) .foreach(_.delete()) - withHttpClient(settings.proxy) { httpClient => + withHttpClient(settings.pluginProxy) { httpClient => val httpGet = new HttpGet(url.toString) try { val response = httpClient.execute(httpGet) diff --git a/src/main/scala/gitbucket/core/plugin/PluginRepository.scala b/src/main/scala/gitbucket/core/plugin/PluginRepository.scala index 56a49f6..1e72ca8 100644 --- a/src/main/scala/gitbucket/core/plugin/PluginRepository.scala +++ b/src/main/scala/gitbucket/core/plugin/PluginRepository.scala @@ -21,7 +21,7 @@ try { val url = new java.net.URL("https://plugins.gitbucket-community.org/releases/plugins.json") - withHttpClient(context.settings.proxy) { httpClient => + withHttpClient(context.settings.pluginProxy) { httpClient => val httpGet = new HttpGet(url.toString) try { val response = httpClient.execute(httpGet) diff --git a/src/main/scala/gitbucket/core/service/SystemSettingsService.scala b/src/main/scala/gitbucket/core/service/SystemSettingsService.scala index 099da95..a4df2bb 100644 --- a/src/main/scala/gitbucket/core/service/SystemSettingsService.scala +++ b/src/main/scala/gitbucket/core/service/SystemSettingsService.scala @@ -70,14 +70,14 @@ props.setProperty(SkinName, settings.skinName.toString) props.setProperty(ShowMailAddress, settings.showMailAddress.toString) props.setProperty(PluginNetworkInstall, settings.pluginNetworkInstall.toString) - settings.proxy.foreach { proxy => - props.setProperty(ProxyHost, proxy.host) - props.setProperty(ProxyPort, proxy.port.toString) + settings.pluginProxy.foreach { proxy => + props.setProperty(PluginProxyHost, proxy.host) + props.setProperty(PluginProxyPort, proxy.port.toString) proxy.user.foreach { user => - props.setProperty(ProxyUser, user) + props.setProperty(PluginProxyUser, user) } proxy.password.foreach { password => - props.setProperty(ProxyPassword, password) + props.setProperty(PluginProxyPassword, password) } } @@ -158,13 +158,13 @@ getValue(props, SkinName, "skin-blue"), getValue(props, ShowMailAddress, false), getValue(props, PluginNetworkInstall, false), - if (getValue(props, ProxyHost, "").nonEmpty) { + if (getValue(props, PluginProxyHost, "").nonEmpty) { Some( Proxy( - getValue(props, ProxyHost, ""), - getValue(props, ProxyPort, 8080), - getOptionValue(props, ProxyUser, None), - getOptionValue(props, ProxyPassword, None) + getValue(props, PluginProxyHost, ""), + getValue(props, PluginProxyPort, 8080), + getOptionValue(props, PluginProxyUser, None), + getOptionValue(props, PluginProxyPassword, None) ) ) } else None @@ -198,7 +198,7 @@ skinName: String, showMailAddress: Boolean, pluginNetworkInstall: Boolean, - proxy: Option[Proxy] + pluginProxy: Option[Proxy] ) { def baseUrl(request: HttpServletRequest): String = @@ -322,10 +322,10 @@ private val SkinName = "skinName" private val ShowMailAddress = "showMailAddress" private val PluginNetworkInstall = "plugin.networkInstall" - private val ProxyHost = "proxy.host" - private val ProxyPort = "proxy.port" - private val ProxyUser = "proxy.user" - private val ProxyPassword = "proxy.password" + private val PluginProxyHost = "plugin.proxy.host" + private val PluginProxyPort = "plugin.proxy.port" + private val PluginProxyUser = "plugin.proxy.user" + private val PluginProxyPassword = "plugin.proxy.password" private def getValue[A: ClassTag](props: java.util.Properties, key: String, default: A): A = { getSystemProperty(key).getOrElse(getEnvironmentVariable(key).getOrElse { diff --git a/src/main/twirl/gitbucket/core/admin/settings_plugins.scala.html b/src/main/twirl/gitbucket/core/admin/settings_plugins.scala.html index ec767cc..0ca1053 100644 --- a/src/main/twirl/gitbucket/core/admin/settings_plugins.scala.html +++ b/src/main/twirl/gitbucket/core/admin/settings_plugins.scala.html @@ -9,7 +9,7 @@
@@ -17,28 +17,28 @@
- +
- +
- +
- +
diff --git a/src/test/scala/gitbucket/core/view/AvatarImageProviderSpec.scala b/src/test/scala/gitbucket/core/view/AvatarImageProviderSpec.scala index 2ca4ae6..f967b0c 100644 --- a/src/test/scala/gitbucket/core/view/AvatarImageProviderSpec.scala +++ b/src/test/scala/gitbucket/core/view/AvatarImageProviderSpec.scala @@ -139,7 +139,7 @@ skinName = "skin-blue", showMailAddress = false, pluginNetworkInstall = false, - proxy = None + pluginProxy = None ) /**