Package com.enterprisedt.util.proxy
Class Socks4ProxySocket
java.lang.Object
java.net.Socket
com.enterprisedt.util.proxy.SocksProxySocket
com.enterprisedt.util.proxy.Socks4ProxySocket
- 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 Socks4ProxySocketconnectViaSocks4Proxy(String remoteHost, int remotePort, String proxyHost, int proxyPort, int timeout, String userId) 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
-
SOCKS4
public static final int SOCKS4- See Also:
-
-
Constructor Details
-
Socks4ProxySocket
public Socks4ProxySocket()
-
-
Method Details
-
sendRequest
- Specified by:
sendRequestin classSocksProxySocket- Throws:
IOException
-
readResponse
- Specified by:
readResponsein classSocksProxySocket- Throws:
IOException
-
connectViaSocks4Proxy
public static Socks4ProxySocket connectViaSocks4Proxy(String remoteHost, int remotePort, String proxyHost, int proxyPort, int timeout, String userId) throws IOException, UnknownHostException - Throws:
IOExceptionUnknownHostException
-