comparison src/net/sourceforge/jsocks/UDPEncapsulation.java @ 349:205ee2873330

update jsocks to 2011-03-19
author Carl Byington <carl@five-ten-sg.com>
date Fri, 01 Aug 2014 11:23:10 -0700
parents 0ce5cc452d02
children
comparison
equal deleted inserted replaced
348:29076621bab0 349:205ee2873330
1 package net.sourceforge.jsocks; 1 package net.sourceforge.jsocks;
2 /** 2 /**
3 This interface provides for datagram encapsulation for SOCKSv5 protocol. 3 This interface provides for datagram encapsulation for SOCKSv5 protocol.
4 <p> 4 <p>
5 SOCKSv5 allows for datagrams to be encapsulated for purposes of integrity 5 SOCKSv5 allows for datagrams to be encapsulated for purposes of integrity
6 and/or authenticity. How it should be done is aggreed during the 6 and/or authenticity. How it should be done is aggreed during the
7 authentication stage, and is authentication dependent. This interface is 7 authentication stage, and is authentication dependent. This interface is
8 provided to allow this encapsulation. 8 provided to allow this encapsulation.
9 @see Authentication 9 @see Authentication
10 */ 10 */
11 public interface UDPEncapsulation { 11 public interface UDPEncapsulation{
12 12
13 /** 13 /**
14 This method should provide any authentication depended transformation 14 This method should provide any authentication depended transformation
15 on datagrams being send from/to the client. 15 on datagrams being send from/to the client.
16 16
17 @param data Datagram data (including any SOCKS related bytes), to be 17 @param data Datagram data (including any SOCKS related bytes), to be
18 encapsulated/decapsulated. 18 encapsulated/decapsulated.
19 @param out Wether the data is being send out. If true method should 19 @param out Wether the data is being send out. If true method should
20 encapsulate/encrypt data, otherwise it should decapsulate/ 20 encapsulate/encrypt data, otherwise it should decapsulate/
21 decrypt data. 21 decrypt data.
22 @throw IOException if for some reason data can be transformed correctly. 22 @throw IOException if for some reason data can be transformed correctly.
23 @return Should return byte array containing data after transformation. 23 @return Should return byte array containing data after transformation.
24 It is possible to return same array as input, if transformation 24 It is possible to return same array as input, if transformation