Mercurial > 510Connectbot
comparison app/src/main/java/net/sourceforge/jsocks/Authentication.java @ 438:d29cce60f393
migrate from Eclipse to Android Studio
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Thu, 03 Dec 2015 11:23:55 -0800 |
parents | src/net/sourceforge/jsocks/Authentication.java@205ee2873330 |
children |
comparison
equal
deleted
inserted
replaced
437:208b31032318 | 438:d29cce60f393 |
---|---|
1 package net.sourceforge.jsocks; | |
2 | |
3 /** | |
4 The Authentication interface provides for performing method specific | |
5 authentication for SOCKS5 connections. | |
6 */ | |
7 public 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 } |