|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsocks.server.ServerAuthenticatorNone
socks.server.IdentAuthenticator
public class IdentAuthenticator
An implementation of socks.ServerAuthentication which provides simple authentication based on the host from which the connection is made and the name of the user on the remote machine, as reported by identd daemon on the remote machine.
It can also be used to provide authentication based only on the contacting host address.
Constructor Summary | |
---|---|
IdentAuthenticator()
Constructs empty IdentAuthenticator. |
Method Summary | |
---|---|
void |
add(InetRange hostRange,
java.util.Hashtable users)
Adds range of addresses from which connection is allowed. |
boolean |
checkRequest(ProxyMessage msg,
java.net.Socket s)
For SOCKS5 requests allways returns true. |
ServerAuthenticator |
startSession(java.net.Socket s)
Grants permission only to those users, who connect from one of the hosts registered with add(InetRange,Hashtable) and whose names, as reported by identd daemon, are listed for the host the connection came from. |
java.lang.String |
toString()
Get String representaion of the IdentAuthenticator. |
Methods inherited from class socks.server.ServerAuthenticatorNone |
---|
checkRequest, checkRequest, endSession, getInputStream, getOutputStream, getUdpEncapsulation, selectSocks5Authentication |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IdentAuthenticator()
Method Detail |
---|
public void add(InetRange hostRange, java.util.Hashtable users)
hostRange
- Range of ip addresses from which connection is allowed.users
- Hashtable of users for whom connection is allowed, or null
to indicate that anybody is allowed to connect from the hosts within given
range.public ServerAuthenticator startSession(java.net.Socket s) throws java.io.IOException
startSession
in interface ServerAuthenticator
startSession
in class ServerAuthenticatorNone
s
- Accepted Socket.
java.io.IOException
public boolean checkRequest(ProxyMessage msg, java.net.Socket s)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |