public class IPChecker extends Object
Constructor and Description |
---|
IPChecker(String name,
String ipAddress,
String port,
String allowPattern,
String denyPattern) |
Modifier and Type | Method and Description |
---|---|
boolean |
accessAllowed(InetAddress inetAddress,
InetAddress proxyAddress)
Checks if the specified InetAdress has permission to access.
|
boolean |
accessAllowed(Socket socket)
Checks if a (connection from a) socket has permission to access.
|
boolean |
accessAllowed(String hostName,
String proxyName)
Checks if the host with the specified name /from the specified proxy has the permission to access.
|
static IPChecker |
getConfiguredIPChecker(HttpServletRequest request)
Returns an IPChecker which is initialized with the patterns from the configuration
|
public static IPChecker getConfiguredIPChecker(HttpServletRequest request)
public boolean accessAllowed(String hostName, String proxyName)
hostName
- the name or string IP representation.proxyName
- the name or string IP representation.public boolean accessAllowed(Socket socket)
socket
- the Socket to check access for.public boolean accessAllowed(InetAddress inetAddress, InetAddress proxyAddress)
inetAddress
- the InetAdress to check access for.proxyAddress
- the InetAdress to check access for (if a rule is defined as proxyRule)@enterprise 10.0.39049 Copyright © 2024 FREQUENTIS AG. All Rights Reserved.