Feature notes: TLS implementation notes (RFC map) · Async TLS socket server architecture
inherits from Exception
Raised by tPeerFilter when a rule string cannot be parsed as a peer range. A rule that does not parse is a configuration mistake, and silently dropping it would leave the filter more permissive than the operator believes, so it is reported rather than ignored.
(no public members)
One address or range, compiled from text.
fAddr: array [0..15] of Byte;
fPrefix: Integer;
fIsV6: Boolean;
function Matches(const aOther: tPeerRange): Boolean;
function ScreenPeer(const aPeer: string; out aReason: tPeerRefusal): tPeerVerdict;
function PermitsToken(const aPeer, aToken: string): Boolean;
procedure ReportActivity(const aPeer: string; aUnits: Integer);
procedure Sweep;
function BlockedCount: Integer;
inherits from TInterfacedObject
implements iPeerFilter
The default implementation.
RULE ORDER, and it is the only order that is safe: DENY wins over ALLOW, and both are decided before the rate limiter is consulted. A peer on the deny list is refused even if it is also allow-listed, because the narrower, more deliberate statement has to be the one that holds.
constructor Create;
destructor Destroy; override;
procedure Deny(const aRange: string);
procedure Allow(const aRange: string);
procedure RestrictToken(const aToken, aRange: string);
function TokenIsRestricted(const aToken: string): Boolean;
procedure SetRateLimit(aLimit, aWindowMs, aBlockMs: Integer);
function ScreenPeer(const aPeer: string; out aReason: tPeerRefusal): tPeerVerdict;
function PermitsToken(const aPeer, aToken: string): Boolean;
procedure ReportActivity(const aPeer: string; aUnits: Integer);
procedure Sweep;
function BlockedCount: Integer;
What the filter says about a peer at accept time.
WHY a peer was refused. For the log and for a test to assert on - never for the wire: telling a peer which rule stopped it maps the policy for them.