Skip to content

Commit 5b8ed07

Browse files
loganbrunsmarcuslinke
authored andcommitted
Issue 674: 3.0.x switch from docker host using https|http scheme to tcp breaks proxy configure (#675)
#674 With the 3.0.x release, the code has been changed to use docker hosts of the format: tcp://host:port Instead of: https://host:port This breaks some of the logic in JerseyDockerCmdExecFactory that configures the proxy setting.
1 parent 5ba770c commit 5b8ed07

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/com/github/dockerjava/jaxrs/JerseyDockerCmdExecFactory.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public void init(DockerClientConfig dockerClientConfig) {
190190
throw new RuntimeException(e);
191191
}
192192

193-
configureProxy(clientConfig, protocol);
193+
configureProxy(clientConfig, originalUri, protocol);
194194
}
195195

196196
connManager = new PoolingHttpClientConnectionManager(getSchemeRegistry(
@@ -241,9 +241,9 @@ private URI sanitizeUrl(URI originalUri) {
241241
return originalUri;
242242
}
243243

244-
private void configureProxy(ClientConfig clientConfig, String protocol) {
244+
private void configureProxy(ClientConfig clientConfig, URI originalUri, String protocol) {
245245

246-
List<Proxy> proxies = ProxySelector.getDefault().select(dockerClientConfig.getDockerHost());
246+
List<Proxy> proxies = ProxySelector.getDefault().select(originalUri);
247247

248248
for (Proxy proxy : proxies) {
249249
InetSocketAddress address = (InetSocketAddress) proxy.address();

0 commit comments

Comments
 (0)