Mercurial > 510Connectbot
changeset 353:20412de44c06
update jsocks to 2011-03-19
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Fri, 01 Aug 2014 11:35:35 -0700 |
parents | 2bc6805cbc91 |
children | 3c16508419fe |
files | src/ch/ethz/ssh2/channel/DynamicAcceptThread.java |
diffstat | 1 files changed, 11 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ch/ethz/ssh2/channel/DynamicAcceptThread.java Fri Aug 01 11:32:33 2014 -0700 +++ b/src/ch/ethz/ssh2/channel/DynamicAcceptThread.java Fri Aug 01 11:35:35 2014 -0700 @@ -67,20 +67,20 @@ startSession(); } catch (IOException ioe) { - int error_code = Proxy.SOCKS_FAILURE; + int error_code = CProxy.SOCKS_FAILURE; if (ioe instanceof SocksException) error_code = ((SocksException) ioe).errCode; else if (ioe instanceof NoRouteToHostException) - error_code = Proxy.SOCKS_HOST_UNREACHABLE; + error_code = CProxy.SOCKS_HOST_UNREACHABLE; else if (ioe instanceof ConnectException) - error_code = Proxy.SOCKS_CONNECTION_REFUSED; + error_code = CProxy.SOCKS_CONNECTION_REFUSED; else if (ioe instanceof InterruptedIOException) - error_code = Proxy.SOCKS_TTL_EXPIRE; + error_code = CProxy.SOCKS_TTL_EXPIRE; - if (error_code > Proxy.SOCKS_ADDR_NOT_SUPPORTED + if (error_code > CProxy.SOCKS_ADDR_NOT_SUPPORTED || error_code < 0) { - error_code = Proxy.SOCKS_FAILURE; + error_code = CProxy.SOCKS_FAILURE; } sendErrorMessage(error_code); @@ -110,7 +110,7 @@ msg = new Socks4Message(push_in, false); } else { - throw new SocksException(Proxy.SOCKS_FAILURE); + throw new SocksException(CProxy.SOCKS_FAILURE); } return msg; @@ -133,15 +133,15 @@ private void handleRequest(ProxyMessage msg) throws IOException { if (!auth.checkRequest(msg)) - throw new SocksException(Proxy.SOCKS_FAILURE); + throw new SocksException(CProxy.SOCKS_FAILURE); switch (msg.command) { - case Proxy.SOCKS_CMD_CONNECT: + case CProxy.SOCKS_CMD_CONNECT: onConnect(msg); break; default: - throw new SocksException(Proxy.SOCKS_CMD_NOT_SUPPORTED); + throw new SocksException(CProxy.SOCKS_CMD_NOT_SUPPORTED); } } @@ -176,7 +176,7 @@ StreamForwarder l2r = null; if (msg instanceof Socks5Message) { - response = new Socks5Message(Proxy.SOCKS_SUCCESS, (InetAddress)null, 0); + response = new Socks5Message(CProxy.SOCKS_SUCCESS, (InetAddress)null, 0); } else { response = new Socks4Message(Socks4Message.REPLY_OK, (InetAddress)null, 0);