public class IdentAuthenticator extends ServerAuthenticatorNone
It can also be used to provide authentication based only on the contacting host address.
Constructor and Description |
---|
IdentAuthenticator()
Constructs empty IdentAuthenticator.
|
Modifier and Type | Method and Description |
---|---|
void |
add(InetRange hostRange,
Hashtable<String,Object> users)
Adds range of addresses from which connection is allowed.
|
boolean |
checkRequest(ProxyMessage msg,
Socket s)
For SOCKS5 requests allways returns true.
|
ServerAuthenticator |
startSession(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.
|
String |
toString()
Get String representaion of the IdentAuthenticator.
|
checkRequest, checkRequest, endSession, getInputStream, getOutputStream, getUdpEncapsulation, selectSocks5Authentication
public IdentAuthenticator()
public void add(InetRange hostRange, Hashtable<String,Object> 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(Socket s) throws IOException
startSession
in interface ServerAuthenticator
startSession
in class ServerAuthenticatorNone
s
- Accepted Socket.IOException
public boolean checkRequest(ProxyMessage msg, Socket s)
Copyright © 2024. All rights reserved.