Restructure solution into folders and fix persistence issues

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
TomandClaude Opus 5.5 committed 2026-11-14 14:10:24 +01:00
1 parent 37987a394a
commit 7c39cb5562
62 files changed
+219 -151

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
namespace Flypaper.Core.Models;
public sealed record TrapContext(TrapSession Session, string? Target = null, string? ClientInfo = null);
+18
View File
@@ -0,0 +1,18 @@
using System.Net;
namespace Flypaper.Core.Models;
public sealed record TrapEvent(
Guid SessionId,
TrapProtocol Protocol,
IPAddress RemoteIp,
string Strategy,
DateTimeOffset StartedAt,
DateTimeOffset EndedAt,
long BytesSent,
TrapOutcome Outcome,
string? Target = null,
string? ClientInfo = null)
{
public TimeSpan Duration => EndedAt - StartedAt;
}
+9
View File
@@ -0,0 +1,9 @@
namespace Flypaper.Core.Models;
public enum TrapOutcome
{
ClientAborted,
Timeout,
Rejected,
Completed
}
+7
View File
@@ -0,0 +1,7 @@
namespace Flypaper.Core.Models;
public enum TrapProtocol
{
Http,
Ssh
}
+8
View File
@@ -0,0 +1,8 @@
using System.Net;
namespace Flypaper.Core.Models;
public sealed record TrapSession(Guid Id, TrapProtocol Protocol, IPAddress RemoteIp, DateTimeOffset StartedAt)
{
public IPAddress RemoteIp { get; init; } = RemoteIp.IsIPv4MappedToIPv6 ? RemoteIp.MapToIPv4() : RemoteIp;
}