-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add user-configurable expire-time to blocklists.
This adds a new config setting, router.blocklist.expireInterval, which causes the blocklist entries to expire at a fixed interval. It is off by default. It may have a value of time in milliseconds, or time with a unit, e.g. 1d, 2m, 6h, etc, or 0. 0 means off. If configured, it runs a job when the interval is reached, which completely clears out the blocklist. The blocklist can still be used for new entries. The precise behavior is as follows: - When a router is added to the transient blocklist, it is given an IP block which expires either at the next router.blocklist.expireInterval or when the router is restarted. - When a router is added to the banlist, it is given an expiration of either 'forever'(0) or a delay in milliseconds, equal to router.blocklist.expireInterval So transient blocklist entries will all expire at the same time, an event which is scheduled after the router is started and run at regular intervals. Peers which are banned because their IP is in the blocklist, on the other hand, are scheduled to be un-banned relative to the time which they were banned at.
- Loading branch information
idk
committed
Jun 11, 2023
1 parent
90aacc6
commit 5c3a650
Showing
1 changed file
with
85 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters