Mercurial > 510Connectbot
diff src/net/sourceforge/jsocks/Socks5Message.java @ 352:2bc6805cbc91
update jsocks to 2011-03-19
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Fri, 01 Aug 2014 11:32:33 -0700 |
parents | 205ee2873330 |
children |
line wrap: on
line diff
--- a/src/net/sourceforge/jsocks/Socks5Message.java Fri Aug 01 11:30:48 2014 -0700 +++ b/src/net/sourceforge/jsocks/Socks5Message.java Fri Aug 01 11:32:33 2014 -0700 @@ -11,7 +11,7 @@ SOCKS5 request/response message. */ -class Socks5Message extends ProxyMessage{ +public class Socks5Message extends ProxyMessage{ /** Address type of given message*/ public int addrType; @@ -50,13 +50,13 @@ addrType = addr.length == 4 ? SOCKS_ATYP_IPV4 : SOCKS_ATYP_IPV6; - + data = new byte[6+addr.length]; data[0] = (byte) SOCKS_VERSION; //Version data[1] = (byte) command; //Command data[2] = (byte) 0; //Reserved byte data[3] = (byte) addrType; //Address type - + //Put Address System.arraycopy(addr,0,data,4,addr.length); //Put port @@ -80,7 +80,7 @@ addrType = SOCKS_ATYP_DOMAINNAME; byte addr[] = hostName.getBytes(); - + data =new byte[7+addr.length]; data[0] = (byte) SOCKS_VERSION; //Version data[1] = (byte) command; //Command @@ -109,9 +109,9 @@ } /** - Initialises Message from the stream. Reads server response or client + Initialises Message from the stream. Reads server response or client request from given stream. - + @param in Input stream to read response from. @param clinetMode If true read server response, else read client request. @throws SocksException If server response code is not SOCKS_SUCCESS(0) and @@ -139,9 +139,9 @@ /** - Initialises Message from the stream. Reads server response or client + Initialises Message from the stream. Reads server response or client request from given stream. - + @param in Input stream to read response from. @param clinetMode If true read server response, else read client request. @throws SocksException If server response code is not SOCKS_SUCCESS(0) and @@ -247,7 +247,7 @@ "PORT "+port+"\n"; return s; } - + /** *Wether to resolve hostIP returned from SOCKS server