|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectProxyServer.ProxyAuthenticator
public class ProxyAuthenticator
Constructor Summary | |
---|---|
ProxyAuthenticator()
Creates new instance of the ServerAuthenticatorNone. |
|
ProxyAuthenticator(java.io.InputStream in,
java.io.OutputStream out)
Constructs new ServerAuthenticatorNone object suitable for returning from the startSession function. |
Method Summary | |
---|---|
boolean |
checkRequest(java.net.DatagramPacket dp,
boolean out)
Allways returns true. |
boolean |
checkRequest(ProxyMessage msg)
Allways returns true. |
void |
endSession()
Does nothing. |
java.io.InputStream |
getInputStream()
Get input stream. |
java.io.OutputStream |
getOutputStream()
Get output stream. |
UDPEncapsulation |
getUdpEncapsulation()
Allways returns null. |
static boolean |
selectSocks5Authentication(java.io.InputStream in,
java.io.OutputStream out,
int methodId)
Convinience routine for selecting SOCKSv5 authentication. |
ServerAuthenticator |
startSession(java.net.Socket s)
Grants access to everyone.Removes authentication related bytes from the stream, when a SOCKS5 connection is being made, selects an authentication NONE. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProxyAuthenticator()
public ProxyAuthenticator(java.io.InputStream in, java.io.OutputStream out)
in
- Input stream to return from getInputStream method.out
- Output stream to return from getOutputStream method.Method Detail |
---|
public ServerAuthenticator startSession(java.net.Socket s) throws java.io.IOException
startSession
in interface ServerAuthenticator
s
- Accepted Socket.
java.io.IOException
public java.io.InputStream getInputStream()
getInputStream
in interface ServerAuthenticator
public java.io.OutputStream getOutputStream()
getOutputStream
in interface ServerAuthenticator
public UDPEncapsulation getUdpEncapsulation()
getUdpEncapsulation
in interface ServerAuthenticator
public boolean checkRequest(ProxyMessage msg)
checkRequest
in interface ServerAuthenticator
msg
- Request message.
public boolean checkRequest(java.net.DatagramPacket dp, boolean out)
checkRequest
in interface ServerAuthenticator
out
- If true the datagram is being send out(from the client),
otherwise it is an incoming datagram.
public void endSession()
endSession
in interface ServerAuthenticator
public static boolean selectSocks5Authentication(java.io.InputStream in, java.io.OutputStream out, int methodId) throws java.io.IOException
This method reads in authentication methods that client supports, checks wether it supports given method. If it does, the notification method is written back to client, that this method have been chosen for authentication. If given method was not found, authentication failure message is send to client ([5,FF]).
in
- Input stream, version byte should be removed from the stream
before calling this method.out
- Output stream.methodId
- Method which should be selected.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |