Skip to content

Commit 63cd7d5

Browse files
authored
Merge pull request #65 from celonis/fix/DP-0000-proxy_bug
Fixing a bug with proxy not being used while configured
2 parents 81156dc + 76d5797 commit 63cd7d5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

connector/src/main/scala/com/celonis/kafka/connect/ems/config/HttpClientConfig.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,14 @@ case class ProxiedHttpClientConfig(
121121
new Proxy(proxyType.javaProxyType, proxyAddr)
122122
}
123123

124-
override def customiseHttpClient(builder: OkHttpClient.Builder): OkHttpClient.Builder =
124+
override def customiseHttpClient(builder: OkHttpClient.Builder): OkHttpClient.Builder = {
125+
builder.proxy(createProxyServer())
125126
authentication match {
126127
case Some(auth) if javaProxyType == JavaProxyType.HTTP => configureHttpProxyAuth(builder, auth)
127128
case Some(auth) if javaProxyType == JavaProxyType.SOCKS => configureSocksProxyAuth(auth); builder
128129
case _ => builder
129130
}
131+
}
130132

131133
private def configureSocksProxyAuth(auth: BasicAuthentication): Unit =
132134
JavaAuthenticator.setDefault(

0 commit comments

Comments
 (0)