Package com.sshtools.j2ssh.net
Class SocksProxySocket
java.lang.Object
java.net.Socket
com.sshtools.j2ssh.net.SocksProxySocket
- All Implemented Interfaces:
TransportProvider
,Closeable
,AutoCloseable
- Version:
- $Revision: 1.14 $
- Author:
- $author$
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic SocksProxySocket
connectViaSocks4Proxy
(String remoteHost, int remotePort, String proxyHost, int proxyPort, String userId) static SocksProxySocket
connectViaSocks5Proxy
(String remoteHost, int remotePort, String proxyHost, int proxyPort, boolean localLookup, String username, String password) static SocksProxySocket
connectViaSocks5Proxy
(String remoteHost, int remotePort, String proxyHost, int proxyPort, String username, String password) toString()
Methods inherited from class java.net.Socket
bind, close, connect, connect, getChannel, getInetAddress, getInputStream, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getOption, getOutputStream, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setKeepAlive, setOOBInline, setOption, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setSoLinger, setSoTimeout, setTcpNoDelay, setTrafficClass, shutdownInput, shutdownOutput, supportedOptions
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.sshtools.j2ssh.net.TransportProvider
close, getInputStream, getOutputStream
-
Field Details
-
SOCKS4
public static final int SOCKS4- See Also:
-
SOCKS5
public static final int SOCKS5- See Also:
-
-
Method Details
-
connectViaSocks4Proxy
public static SocksProxySocket connectViaSocks4Proxy(String remoteHost, int remotePort, String proxyHost, int proxyPort, String userId) throws IOException, UnknownHostException - Parameters:
remoteHost
-remotePort
-proxyHost
-proxyPort
-userId
-- Returns:
- Throws:
IOException
UnknownHostException
SocketException
-
connectViaSocks5Proxy
public static SocksProxySocket connectViaSocks5Proxy(String remoteHost, int remotePort, String proxyHost, int proxyPort, boolean localLookup, String username, String password) throws IOException, UnknownHostException - Parameters:
remoteHost
-remotePort
-proxyHost
-proxyPort
-localLookup
-username
-password
-- Returns:
- Throws:
IOException
UnknownHostException
SocketException
-
getProviderDetail
- Specified by:
getProviderDetail
in interfaceTransportProvider
- Returns:
-
toString
-
connectViaSocks5Proxy
public static SocksProxySocket connectViaSocks5Proxy(String remoteHost, int remotePort, String proxyHost, int proxyPort, String username, String password) throws IOException, UnknownHostException - Parameters:
remoteHost
-remotePort
-proxyHost
-proxyPort
-username
-password
-- Returns:
- Throws:
IOException
UnknownHostException
-