public class BlocklistEntries extends Object
Represents a signed blocklist containing router identifiers to be blocked or unblocked, with support for cryptographic signature verification and timestamp validation.
Provides methods for loading, verifying, and managing blocklist entries with security checks to prevent expired or invalid blocklists. Includes command-line tool for creating signed blocklist files from input text.
All String fields may be null to accommodate optional metadata elements in blocklist feeds.
| Modifier and Type | Field and Description |
|---|---|
List<String> | entriesList of entries to block. |
static int | MAX_ENTRIESMaximum number of entries allowed in a blocklist. |
static long | MAX_FUTUREMaximum future timestamp allowed for blocklist validation (2 days). |
List<String> | removesList of entries to unblock. |
String | sigSignature in type:base64 format. |
String | signerSigner certificate name. |
String | supdatedUpdated timestamp as ISO 3339 date string. |
long | updatedUpdated timestamp as milliseconds since epoch. |
| Constructor and Description |
|---|
BlocklistEntries(int capacity)Creates a new BlocklistEntries with the specified capacity. |
| Modifier and Type | Method and Description |
|---|---|
boolean | isVerified()Check if the blocklist signature has been verified. |
static void | main(String[] args)BlocklistEntries [-p keystorepw] input.txt keystore.ks you@mail.i2p
File format: One entry per line, # starts a comment, ! starts an unblock entry. |
boolean | verify(I2PAppContext ctx)Verify the blocklist signature. |
public final List<String> entries
public static final int MAX_ENTRIES
public static final long MAX_FUTURE
public String sig
public String signer
public String supdated
public long updated
public BlocklistEntries(int capacity)
capacity - the initial capacity for the entries listpublic boolean isVerified()
public static void main(String[] args)
args - command line argumentspublic boolean verify(I2PAppContext ctx)
ctx - the application context