# HG changeset patch # User Carl Byington # Date 1406918135 25200 # Node ID 20412de44c061f82b49a5d871c33fa53c64ba3e5 # Parent 2bc6805cbc91956695596978a533920a51ecdff8 update jsocks to 2011-03-19 diff -r 2bc6805cbc91 -r 20412de44c06 src/ch/ethz/ssh2/channel/DynamicAcceptThread.java --- 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);