public class SocksProxyTransport extends Socket implements SshTransport
SshTransport implementation that can
route the connection through a SOCKS 4 or SOCKS 5 proxy.| Modifier and Type | Method and Description |
|---|---|
static SocksProxyTransport |
connectViaSocks4Proxy(String remoteHost,
int remotePort,
String proxyHost,
int proxyPort,
String userId)
Connect the socket to a SOCKS 4 proxy and request forwarding to our
remote host.
|
static SocksProxyTransport |
connectViaSocks5Proxy(String remoteHost,
int remotePort,
String proxyHost,
int proxyPort,
boolean localLookup,
String username,
String password)
Connect the socket to a SOCKS 5 proxy and request forwarding to our
remote host.
|
static SocksProxyTransport |
connectViaSocks5Proxy(String remoteHost,
int remotePort,
String proxyHost,
int proxyPort,
String username,
String password) |
SshTransport |
duplicate()
Create a new copy of this transport and connect to the same host:port
combination.
|
String |
getHost()
Get the name of the connected host.
|
String |
toString() |
bind, close, connect, connect, getChannel, getInetAddress, getInputStream, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getOutputStream, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setKeepAlive, setOOBInline, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setSoLinger, setSoTimeout, setTcpNoDelay, setTrafficClass, shutdownInput, shutdownOutputclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetPortclose, getInputStream, getOutputStreampublic static final int SOCKS4
public static final int SOCKS5
public static SocksProxyTransport connectViaSocks4Proxy(String remoteHost, int remotePort, String proxyHost, int proxyPort, String userId) throws IOException, UnknownHostException
remoteHost - remotePort - proxyHost - proxyPort - userId - IOExceptionUnknownHostExceptionpublic static SocksProxyTransport connectViaSocks5Proxy(String remoteHost, int remotePort, String proxyHost, int proxyPort, boolean localLookup, String username, String password) throws IOException, UnknownHostException
remoteHost - remotePort - proxyHost - proxyPort - localLookup - username - password - IOExceptionUnknownHostExceptionpublic static SocksProxyTransport connectViaSocks5Proxy(String remoteHost, int remotePort, String proxyHost, int proxyPort, String username, String password) throws IOException, UnknownHostException
IOExceptionUnknownHostExceptionpublic String getHost()
SshTransportgetHost in interface SshTransportpublic SshTransport duplicate() throws IOException
SshTransportduplicate in interface SshTransportIOExceptionCopyright © 2014. All rights reserved.