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 -1
View File
@@ -1,6 +1,8 @@
using System.Net;
using System.Net.Sockets;
using Flypaper.Core;
using Flypaper.Core.Settings;
using Flypaper.Http.Matching;
using Flypaper.Http.Middleware;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.Extensions.Configuration;
+2 -1
View File
@@ -1,4 +1,5 @@
using Flypaper.Core;
using Flypaper.Core.Abstractions;
using Flypaper.Core.Models;
using Microsoft.AspNetCore.Http;
namespace Flypaper.Http;
@@ -1,4 +1,4 @@
namespace Flypaper.Http;
namespace Flypaper.Http.Matching;
public enum TrapMatch
{
@@ -1,6 +1,6 @@
using Microsoft.Extensions.Options;
namespace Flypaper.Http;
namespace Flypaper.Http.Matching;
public sealed class TrapMatcher : IDisposable
{
@@ -1,10 +1,13 @@
using System.Net;
using Flypaper.Core;
using Flypaper.Core.Abstractions;
using Flypaper.Core.Models;
using Flypaper.Core.Runtime;
using Flypaper.Http.Matching;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.AspNetCore.Server.Kestrel.Core.Features;
namespace Flypaper.Http;
namespace Flypaper.Http.Middleware;
internal sealed class FlypaperMiddleware(
RequestDelegate next,
@@ -21,11 +24,10 @@ internal sealed class FlypaperMiddleware(
return;
}
var remoteIp = context.Connection.RemoteIpAddress ?? IPAddress.None;
var session = new TrapSession(
Guid.NewGuid(),
TrapProtocol.Http,
remoteIp.IsIPv4MappedToIPv6 ? remoteIp.MapToIPv4() : remoteIp,
context.Connection.RemoteIpAddress ?? IPAddress.None,
timeProvider.GetUtcNow());
var trapContext = new TrapContext(
@@ -3,7 +3,7 @@ using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Options;
namespace Flypaper.Http;
namespace Flypaper.Http.Middleware;
internal sealed class RealIpMiddleware(RequestDelegate next, IOptions<ForwardedHeadersOptions> options)
{