Add research page with MCP write tools, longer hold for repeat offenders and svn/hg decoys
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a25072e6fb
commit
e88dc415f9
48 files changed
+1983
-57
No files matched your search
@@ -11,6 +11,7 @@ public sealed partial class TrapRunner(
|
||||
IConnectionGovernor governor,
|
||||
ITrapStrategySelector strategies,
|
||||
ITrapEventSink sink,
|
||||
IRepeatOffenderLookup repeatOffenders,
|
||||
IOptionsMonitor<FlypaperOptions> options,
|
||||
TimeProvider timeProvider,
|
||||
ILogger<TrapRunner> logger)
|
||||
@@ -37,6 +38,14 @@ public sealed partial class TrapRunner(
|
||||
holdDuration = extension.MinimumHold;
|
||||
}
|
||||
|
||||
if (options.CurrentValue is { RepeatWindowDays: > 0 } current
|
||||
&& current.RepeatHoldDuration > holdDuration
|
||||
&& await repeatOffenders.HasTimedOutSinceAsync(session.RemoteIp, timeProvider.GetUtcNow().UtcDateTime.AddDays(-current.RepeatWindowDays), ct))
|
||||
{
|
||||
holdDuration = current.RepeatHoldDuration;
|
||||
description += " repeat";
|
||||
}
|
||||
|
||||
using var hold = new CancellationTokenSource(holdDuration, timeProvider);
|
||||
using var linked = CancellationTokenSource.CreateLinkedTokenSource(ct, hold.Token);
|
||||
|
||||
|
||||
Reference in new issue
Block a user