Restructure solution into folders and fix persistence issues
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
37987a394a
commit
7c39cb5562
62 files changed
+219
-151
No files matched your search
@@ -0,0 +1,3 @@
|
||||
namespace Flypaper.Core.Models;
|
||||
|
||||
public sealed record TrapContext(TrapSession Session, string? Target = null, string? ClientInfo = null);
|
||||
@@ -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;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Flypaper.Core.Models;
|
||||
|
||||
public enum TrapOutcome
|
||||
{
|
||||
ClientAborted,
|
||||
Timeout,
|
||||
Rejected,
|
||||
Completed
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Flypaper.Core.Models;
|
||||
|
||||
public enum TrapProtocol
|
||||
{
|
||||
Http,
|
||||
Ssh
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user