Package com.enterprisedt.util.proxy
Class Socks5ProxySocket
java.lang.Object
java.net.Socket
com.enterprisedt.util.proxy.SocksProxySocket
com.enterprisedt.util.proxy.Socks5ProxySocket
- All Implemented Interfaces:
StreamSocket,Closeable,AutoCloseable
- Version:
- $Revision$
- Author:
- $author$
-
Field Summary
FieldsFields inherited from class com.enterprisedt.util.proxy.SocksProxySocket
BIND, bindingAddress, bindingPort, CONNECT, NULL_TERMINATION, password, providerDetail, proxyHost, proxyIn, proxyOut, proxyPort, remoteHostname, username -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Socks5ProxySocketconnectViaSocks5Proxy(String remoteHost, int remotePort, String proxyHost, int proxyPort, int timeout, String username, String password) protected voidprotected voidsendRequest(int command, String remoteHost, int remotePort) Methods inherited from class com.enterprisedt.util.proxy.SocksProxySocket
accept, bind, connect, getBindingAddress, getBindingPort, getDetail, getPassword, getProxyHost, getProxyPort, getRemoteHost, getUsername, isSecureMode, setPassword, setProxyHost, setProxyPort, setRemoteHost, setUsername, toStringMethods inherited from class java.net.Socket
bind, close, 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, supportedOptionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.enterprisedt.util.proxy.StreamSocket
close, getInetAddress, getInputStream, getLocalAddress, getLocalPort, getOutputStream, getReceiveBufferSize, getSendBufferSize, getSoTimeout, isConnected, setReceiveBufferSize, setSendBufferSize, setSoTimeout
-
Field Details
-
SOCKS5
public static final int SOCKS5- See Also:
-
-
Constructor Details
-
Socks5ProxySocket
public Socks5ProxySocket()
-
-
Method Details
-
sendRequest
- Specified by:
sendRequestin classSocksProxySocket- Throws:
IOException
-
readResponse
- Specified by:
readResponsein classSocksProxySocket- Throws:
IOException
-
connectViaSocks5Proxy
public static Socks5ProxySocket connectViaSocks5Proxy(String remoteHost, int remotePort, String proxyHost, int proxyPort, int timeout, String username, String password) throws IOException, UnknownHostException - Throws:
IOExceptionUnknownHostException
-