Class IPFilter


  • public final class IPFilter
    extends Object
    Class allowing to check if an IP address is in a filter list (white or black list). Be careful the current implementation is IPv4 dependent and any IPv6 address is refused.
    • Constructor Detail

      • IPFilter

        public IPFilter​(String IPAllowedList)
        Creates list of IP allowed list from declaration.
    • Method Detail

      • checkIpAllowed

        public boolean checkIpAllowed​(String addr)
        Check if the addr is authorized (all local address is authorized).
        Parameters:
        addr - The ip address to check
        Returns:
        true if authorized
        Throws:
        UnknownHostException
        SocketException