diff options
2 files changed, 6 insertions, 2 deletions
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshClient.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshClient.java index 98e71dfe4b..377eabb00a 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshClient.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshClient.java @@ -177,6 +177,10 @@ public class JGitSshClient extends SshClient { return remoteAddress; } InetSocketAddress address = (InetSocketAddress) proxy.address(); + if (address.isUnresolved()) { + address = new InetSocketAddress(address.getHostName(), + address.getPort()); + } switch (proxy.type()) { case HTTP: setClientProxyConnector( diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/DefaultProxyDataFactory.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/DefaultProxyDataFactory.java index 97e0da0428..66e595c6cc 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/DefaultProxyDataFactory.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/DefaultProxyDataFactory.java @@ -62,8 +62,8 @@ public class DefaultProxyDataFactory implements ProxyDataFactory { public ProxyData get(InetSocketAddress remoteAddress) { try { List<Proxy> proxies = ProxySelector.getDefault() - .select(new URI(Proxy.Type.SOCKS.name(), - "//" + remoteAddress.getHostString(), null)); //$NON-NLS-1$ + .select(new URI( + "socket://" + remoteAddress.getHostString())); //$NON-NLS-1$ ProxyData data = getData(proxies, Proxy.Type.SOCKS); if (data == null) { proxies = ProxySelector.getDefault() |