Add Flypaper solution skeleton with HTTP tarpit, SQLite event log and tests

This commit is contained in:
Tom committed 2026-11-14 13:15:57 +01:00
1 parent 20314268c6
commit f9161f48e7
55 files changed
+1331

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
using System.Collections.Concurrent;
using System.Net;
using Flypaper.Core;
namespace Flypaper.Tests;
internal sealed class FakeTrapChannel : ITrapChannel
{
public TrapSession Session { get; } = new(Guid.NewGuid(), TrapProtocol.Http, IPAddress.Loopback, DateTimeOffset.UtcNow);
public ConcurrentQueue<byte[]> Writes { get; } = new();
public ValueTask WriteAsync(ReadOnlyMemory<byte> data, CancellationToken ct)
{
ct.ThrowIfCancellationRequested();
Writes.Enqueue(data.ToArray());
return ValueTask.CompletedTask;
}
}