Package org.apache.nutch.protocol.okhttp

## Class IPFilterRules

- java.lang.Object
- - org.apache.nutch.protocol.okhttp.IPFilterRules

-     public class IPFilterRules
      extends Object

  Optionally limit or block connections to IP address ranges (localhost/loopback or site-local addresses, subnet ranges given in CIDR notation, or single IP addresses). IP filter rules are built from two Nutch properties:
  - `http.filter.ipaddress.include` defines all allowed IP ranges. If not defined or empty all IP addresses (and not explicitly excluded) are allowed.
  - `http.filter.ipaddress.exclude` defines excluded IP address ranges.
  IP ranges can be defined as
  - IP address, e.g. `127.0.0.1` or `::1` (IPv6)
  - CIDR notation, e.g. `192.168.0.0/16` or `fd00::/8`
  - `localhost` or `loopback` applies to all IP addresses for which `InetAddress.isLoopbackAddress()` is true
  - `sitelocal` applies to all IP addresses for which `InetAddress.isSiteLocalAddress()` is true
  Multiple IP ranges are separated by a comma, e.g. `loopback,sitelocal,fd00::/8`

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected static org.slf4j.Logger` | `LOG` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `IPFilterRules​(Configuration conf)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `accept​(InetAddress address)` |
    `boolean` | `isEmpty()` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### LOG

          protected static final org.slf4j.Logger LOG

  - ### Constructor Detail

    - #### IPFilterRules

          public IPFilterRules​(Configuration conf)

  - ### Method Detail

    - #### isEmpty

          public boolean isEmpty()

    - #### accept

          public boolean accept​(InetAddress address)