annotate src/net/sourceforge/jsocks/Authentication.java @ 362:d51bf957d955

add help files to the web documentation
author Carl Byington <carl@five-ten-sg.com>
date Mon, 04 Aug 2014 08:41:56 -0700
parents 205ee2873330
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
349
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
1 package net.sourceforge.jsocks;
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
2
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
3 /**
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
4 The Authentication interface provides for performing method specific
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
5 authentication for SOCKS5 connections.
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
6 */
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
7 public interface Authentication{
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
8 /**
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
9 This method is called when SOCKS5 server have selected a particular
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
10 authentication method, for whch an implementaion have been registered.
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
11
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
12 <p>
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
13 This method should return an array {inputstream,outputstream
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
14 [,UDPEncapsulation]}. The reason for that is that SOCKS5 protocol
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
15 allows to have method specific encapsulation of data on the socket for
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
16 purposes of integrity or security. And this encapsulation should be
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
17 performed by those streams returned from the method. It is also possible
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
18 to encapsulate datagrams. If authentication method supports such
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
19 encapsulation an instance of the UDPEncapsulation interface should be
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
20 returned as third element of the array, otherwise either null should be
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
21 returned as third element, or array should contain only 2 elements.
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
22
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
23 @param methodId Authentication method selected by the server.
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
24 @param proxySocket Socket used to conect to the proxy.
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
25 @return Two or three element array containing
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
26 Input/Output streams which should be used on this connection.
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
27 Third argument is optional and should contain an instance
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
28 of UDPEncapsulation. It should be provided if the authentication
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
29 method used requires any encapsulation to be done on the
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
30 datagrams.
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
31 */
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
32 Object[] doSocksAuthentication(int methodId,java.net.Socket proxySocket)
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
33 throws java.io.IOException;
205ee2873330 update jsocks to 2011-03-19
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
34 }