Mercurial > 510Connectbot
changeset 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 | 1bf94d2bfafe |
children | 20412de44c06 |
files | src/net/sourceforge/jsocks/Socks4Message.java src/net/sourceforge/jsocks/Socks5Message.java |
diffstat | 2 files changed, 13 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/src/net/sourceforge/jsocks/Socks4Message.java Fri Aug 01 11:30:48 2014 -0700 +++ b/src/net/sourceforge/jsocks/Socks4Message.java Fri Aug 01 11:32:33 2014 -0700 @@ -2,11 +2,11 @@ import java.io.*; import java.net.*; -/** +/** SOCKS4 Reply/Request message. */ -class Socks4Message extends ProxyMessage{ +public class Socks4Message extends ProxyMessage{ private byte[] msgBytes; private int msgLength; @@ -25,14 +25,14 @@ msgBytes[1] = (byte) command; } - /** + /** * Server successfull reply */ public Socks4Message(int cmd,InetAddress ip,int port){ this(0,cmd,ip,port,null); } - /** + /** * Client request */ public Socks4Message(int cmd,InetAddress ip,int port,String user){
--- 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