Class Socks5ClientConnector
- java.lang.Object
-
- org.eclipse.jgit.internal.transport.sshd.proxy.AbstractClientProxyConnector
-
- org.eclipse.jgit.internal.transport.sshd.proxy.Socks5ClientConnector
-
- All Implemented Interfaces:
org.apache.sshd.client.session.ClientProxyConnector
,StatefulProxyConnector
public class Socks5ClientConnector extends AbstractClientProxyConnector
AAbstractClientProxyConnector
to connect through a SOCKS5 proxy.- See Also:
- RFC 1928
-
-
Field Summary
-
Fields inherited from class org.eclipse.jgit.internal.transport.sshd.proxy.AbstractClientProxyConnector
proxyAddress, proxyPassword, proxyUser, remoteAddress
-
Fields inherited from interface org.eclipse.jgit.internal.transport.sshd.proxy.StatefulProxyConnector
TIMEOUT_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description Socks5ClientConnector(InetSocketAddress proxyAddress, InetSocketAddress remoteAddress)
Creates a newSocks5ClientConnector
.Socks5ClientConnector(InetSocketAddress proxyAddress, InetSocketAddress remoteAddress, String proxyUser, char[] proxyPassword)
Creates a newSocks5ClientConnector
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
messageReceived(org.apache.sshd.common.io.IoSession session, org.apache.sshd.common.util.Readable buffer)
Handle a received message.void
sendClientProxyMetadata(org.apache.sshd.client.session.ClientSession sshSession)
-
Methods inherited from class org.eclipse.jgit.internal.transport.sshd.proxy.AbstractClientProxyConnector
adjustTimeout, clearPassword, getTimeout, init, runWhenDone, setDone
-
-
-
-
Constructor Detail
-
Socks5ClientConnector
public Socks5ClientConnector(@NonNull InetSocketAddress proxyAddress, @NonNull InetSocketAddress remoteAddress)
Creates a newSocks5ClientConnector
. The connector supports anonymous connections as well as username-password or Kerberos5 (GSS-API) authentication.- Parameters:
proxyAddress
- of the proxy server we're connecting toremoteAddress
- of the target server to connect to
-
Socks5ClientConnector
public Socks5ClientConnector(@NonNull InetSocketAddress proxyAddress, @NonNull InetSocketAddress remoteAddress, String proxyUser, char[] proxyPassword)
Creates a newSocks5ClientConnector
. The connector supports anonymous connections as well as username-password or Kerberos5 (GSS-API) authentication.- Parameters:
proxyAddress
- of the proxy server we're connecting toremoteAddress
- of the target server to connect toproxyUser
- to authenticate at the proxy withproxyPassword
- to authenticate at the proxy with
-
-
Method Detail
-
sendClientProxyMetadata
public void sendClientProxyMetadata(org.apache.sshd.client.session.ClientSession sshSession) throws Exception
- Throws:
Exception
-
messageReceived
public void messageReceived(org.apache.sshd.common.io.IoSession session, org.apache.sshd.common.util.Readable buffer) throws Exception
Description copied from interface:StatefulProxyConnector
Handle a received message.- Parameters:
session
- to use for writing databuffer
- received data- Throws:
Exception
- if data cannot be read, or the connection attempt fails
-
-