Android Open Source - Orlib Authentication






From Project

Back to project page Orlib.

License

The source code is released under:

GNU Lesser General Public License

If you think the Android project Orlib listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package net.sourceforge.jsocks.socks;
/* ww  w  .  j a  v  a  2  s  .c o m*/
/**
 The Authentication interface provides for performing method specific
 authentication for SOCKS5 connections.
*/
public interface Authentication{
   /**
     This method is called when SOCKS5 server have selected a particular
     authentication method, for whch an implementaion have been registered.

     <p>
     This method should return an array {inputstream,outputstream 
     [,UDPEncapsulation]}. The reason for that is that SOCKS5 protocol
     allows to have method specific encapsulation of data on the socket for 
     purposes of integrity or security. And this encapsulation should be 
     performed by those streams returned from the method. It is also possible
     to encapsulate datagrams. If authentication method supports such 
     encapsulation an instance of the UDPEncapsulation interface should be
     returned as third element of the array, otherwise either null should be
     returned as third element, or array should contain only 2 elements.

     @param methodId Authentication method selected by the server.
     @param proxySocket Socket used to conect to the proxy.
     @return Two or three element array containing 
             Input/Output streams which should be used on this connection.
             Third argument is optional and should contain an instance
             of UDPEncapsulation. It should be provided if the authentication
             method used requires any encapsulation to be done on the
             datagrams.
   */
   Object[] doSocksAuthentication(int methodId,java.net.Socket proxySocket)
           throws java.io.IOException;
}




Java Source Code List

info.guardianproject.net.SocksSocketFactory.java
info.guardianproject.net.http.HttpManager.java
info.guardianproject.net.http.ModSSLSocketFactory.java
info.guardianproject.net.http.MyDefaultClientConnectionOperator.java
info.guardianproject.net.http.MyThreadSafeClientConnManager.java
info.guardianproject.net.http.SocksHttpClient.java
net.sourceforge.jsocks.SOCKS.java
net.sourceforge.jsocks.SocksServerException.java
net.sourceforge.jsocks.socks.AuthenticationException.java
net.sourceforge.jsocks.socks.AuthenticationNone.java
net.sourceforge.jsocks.socks.Authentication.java
net.sourceforge.jsocks.socks.InetRange.java
net.sourceforge.jsocks.socks.ProxyMessage.java
net.sourceforge.jsocks.socks.ProxyServer.java
net.sourceforge.jsocks.socks.Proxy.java
net.sourceforge.jsocks.socks.Socks4Message.java
net.sourceforge.jsocks.socks.Socks4Proxy.java
net.sourceforge.jsocks.socks.Socks5DatagramSocket.java
net.sourceforge.jsocks.socks.Socks5Message.java
net.sourceforge.jsocks.socks.Socks5Proxy.java
net.sourceforge.jsocks.socks.SocksException.java
net.sourceforge.jsocks.socks.SocksServerSocket.java
net.sourceforge.jsocks.socks.SocksSocket.java
net.sourceforge.jsocks.socks.UDPEncapsulation.java
net.sourceforge.jsocks.socks.UDPRelayServer.java
net.sourceforge.jsocks.socks.UserPasswordAuthentication.java
net.sourceforge.jsocks.socks.server.IdentAuthenticator.java
net.sourceforge.jsocks.socks.server.Ident.java
net.sourceforge.jsocks.socks.server.ServerAuthenticatorNone.java
net.sourceforge.jsocks.socks.server.ServerAuthenticator.java
net.sourceforge.jsocks.socks.server.UserPasswordAuthenticator.java
net.sourceforge.jsocks.socks.server.UserValidation.java
orlib.sample.OrlibMainActivity.java