Package org.apache.nutch.protocol.okhttp
Class IPFilterRules
java.lang.Object
org.apache.nutch.protocol.okhttp.IPFilterRules
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.includedefines all allowed IP ranges. If not defined or empty all IP addresses (and not explicitly excluded) are allowed.http.filter.ipaddress.excludedefines excluded IP address ranges.
- IP address, e.g.
127.0.0.1or::1(IPv6) - CIDR notation, e.g.
192.168.0.0/16orfd00::/8 localhostorloopbackapplies to all IP addresses for whichInetAddress.isLoopbackAddress()is truesitelocalapplies to all IP addresses for whichInetAddress.isSiteLocalAddress()is true
loopback,sitelocal,fd00::/8-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOG
-
-
Constructor Details
-
IPFilterRules
-
-
Method Details
-
isEmpty
public boolean isEmpty() -
accept
-