source: branches/2.2/jabberit_messenger/java_source/src/nu/fw/jeti/plugins/filetransfer/socks5/jsocks/Authentication.java @ 3102

Revision 3102, 1.6 KB checked in by amuller, 14 years ago (diff)

Ticket #986 - Efetuado merge para o Branch 2.2( atualizacao do modulo)

  • Property svn:executable set to *
Line 
1package nu.fw.jeti.plugins.filetransfer.socks5.jsocks;
2
3/**
4 The Authentication interface provides for performing method specific
5 authentication for SOCKS5 connections.
6*/
7public interface Authentication{
8   /**
9     This method is called when SOCKS5 server have selected a particular
10     authentication method, for whch an implementaion have been registered.
11
12     <p>
13     This method should return an array {inputstream,outputstream
14     [,UDPEncapsulation]}. The reason for that is that SOCKS5 protocol
15     allows to have method specific encapsulation of data on the socket for
16     purposes of integrity or security. And this encapsulation should be
17     performed by those streams returned from the method. It is also possible
18     to encapsulate datagrams. If authentication method supports such
19     encapsulation an instance of the UDPEncapsulation interface should be
20     returned as third element of the array, otherwise either null should be
21     returned as third element, or array should contain only 2 elements.
22
23     @param methodId Authentication method selected by the server.
24     @param proxySocket Socket used to conect to the proxy.
25     @return Two or three element array containing
26             Input/Output streams which should be used on this connection.
27             Third argument is optional and should contain an instance
28             of UDPEncapsulation. It should be provided if the authentication
29             method used requires any encapsulation to be done on the
30             datagrams.
31   */
32   Object[] doSocksAuthentication(int methodId,java.net.Socket proxySocket)
33           throws java.io.IOException;
34}
Note: See TracBrowser for help on using the repository browser.