Package one.nio.net
Class SocksProxy
- java.lang.Object
-
- one.nio.net.SocksProxy
-
-
Constructor Summary
Constructors Constructor Description SocksProxy(java.lang.String proxyHost, int proxyPort)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnect(Socket socket, java.lang.String host, int port)private static java.lang.StringgetErrorMessage(byte b)private voidreadResponse(Socket socket, byte[] buf, byte authMethod)SocksProxywithAuth(java.lang.String user, java.lang.String password)
-
-
-
Method Detail
-
withAuth
public SocksProxy withAuth(java.lang.String user, java.lang.String password)
-
connect
public void connect(Socket socket, java.lang.String host, int port) throws java.io.IOException
-
readResponse
private void readResponse(Socket socket, byte[] buf, byte authMethod) throws java.io.IOException
- Throws:
java.io.IOException
-
getErrorMessage
private static java.lang.String getErrorMessage(byte b)
-
-