Package net.i2p.i2ptunnel.access
Class AccessFilter
java.lang.Object
net.i2p.i2ptunnel.access.AccessFilter
- All Implemented Interfaces:
IncomingConnectionFilter,StatefulConnectionFilter
A filter for incoming connections which can be configured
based on access list rules.
It keeps a track of known destinations - those defined in existing access
lists and unknown ones - those who are not defined in such lists but have
recently attempted to connect to us.
Every SYNC_INTERVAL seconds the access lists are reloaded from disk if they
have changed according to file modification time. This
allows the user to edit them. Also, if any recorders are defined in the
access rules, they will write to disk at such interval if there have been
any new breaches.
- Since:
- 0.9.40
-
Field Summary
Fields inherited from interface net.i2p.client.streaming.IncomingConnectionFilter
ALLOW, DENY -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
AccessFilter
AccessFilter(I2PAppContext context, FilterDefinition definition) throws IOException - Parameters:
context- the context, used for scheduling and timer purposesdefinition- definition of this filter- Throws:
IOException
-
-
Method Details
-
start
public void start()Description copied from interface:StatefulConnectionFilterTells this filter to start- Specified by:
startin interfaceStatefulConnectionFilter
-
stop
public void stop()Description copied from interface:StatefulConnectionFilterTells this filter to stop and release any resources- Specified by:
stopin interfaceStatefulConnectionFilter
-
allowDestination
- Specified by:
allowDestinationin interfaceIncomingConnectionFilter- Parameters:
d- the destination that wants to establish an incoming connection- Returns:
- true if the connection should be allowed.
-