From b7027e2a72e4a3be1fd03a4e1153e2e8b6472e48 Mon Sep 17 00:00:00 2001 From: Tom Date: Mon, 16 Nov 2026 23:34:10 +0100 Subject: [PATCH] Show the strategy of each catch in the dashboard Add a Strategie column to the catch list (searchable, filterable) and a Strategien tab to the Top 10 card. The MCP top tool accepts strategies. Co-Authored-By: Claude Sonnet 5.5 --- CHANGELOG.md | 4 ++++ .../Dashboard/DashboardData.cs | 1 + .../Dashboard/DashboardQueries.cs | 7 +++++++ .../Dashboard/RecentFilter.cs | 1 + src/Flypaper.Storage/Queries/CatchQueries.cs | 2 ++ src/Flypaper.Storage/Queries/CatchRecords.cs | 1 + .../Pages/Dashboard/DashboardFilter.cs | 5 +++++ .../Pages/Dashboard/DashboardPage.razor | 19 +++++++++++++---- src/Flypaper.Web/Mcp/FlypaperTools.cs | 7 ++++--- src/Flypaper.Web/wwwroot/app.css | 5 +++++ test/Flypaper.Tests/Mcp/FlypaperToolsTests.cs | 1 + test/Flypaper.Tests/Mcp/McpEndpointTests.cs | 4 ++-- test/Flypaper.Tests/Mcp/McpTestData.cs | 9 ++++---- .../Storage/RecentCatchesTests.cs | 21 ++++++++++++++++++- .../Web/DashboardFilterTests.cs | 20 +++++++++--------- 15 files changed, 83 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e165557..c32e1f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,10 @@ All notable changes to Flypaper are documented in this file. The format follows ### Added +- Dashboard: the catch list has a new „Strategie“ column (hidden on narrower screens, shown in + the expanded row) and the search covers it. A new „Strategien“ tab in the Top 10 card shows + catches and hold time per strategy and filters the list on click. The MCP `top` tool accepts + `strategies` as a dimension. - Content matches the requested path: `.env`, `*.json`, `*.xml` (sitemaps), `*.yml`, `*.sql`, `/.git/…`, `robots.txt`, Hikvision `/SDK/…` and `/ISAPI/…` (XML) and `wp-login.php` (WordPress login page) get an endless, matching file with the right `Content-Type` diff --git a/src/Flypaper.Storage/Dashboard/DashboardData.cs b/src/Flypaper.Storage/Dashboard/DashboardData.cs index a72a7bb..ad46a30 100644 --- a/src/Flypaper.Storage/Dashboard/DashboardData.cs +++ b/src/Flypaper.Storage/Dashboard/DashboardData.cs @@ -10,6 +10,7 @@ public sealed record DashboardData( TimeSpan TotalHoldTime, IReadOnlyList TopIps, IReadOnlyList TopTargets, + IReadOnlyList TopStrategies, IReadOnlyList TopCountries, IReadOnlyList TopProviders, IReadOnlyDictionary CatchesByCountry); diff --git a/src/Flypaper.Storage/Dashboard/DashboardQueries.cs b/src/Flypaper.Storage/Dashboard/DashboardQueries.cs index 9fbfa8c..5f32bb2 100644 --- a/src/Flypaper.Storage/Dashboard/DashboardQueries.cs +++ b/src/Flypaper.Storage/Dashboard/DashboardQueries.cs @@ -42,6 +42,7 @@ public sealed class DashboardQueries(IDbContextFactory dbCont TimeSpan.FromMilliseconds(await catches.SumAsync(e => e.DurationMs, ct)), await TopAsync(catches.GroupBy(e => e.RemoteIp), ct), await TopAsync(catches.Where(e => e.Target != null).GroupBy(e => e.Target!), ct), + await TopAsync(catches.GroupBy(e => e.Strategy), ct), countries .Take(TopCount) .Select(x => new TopEntry(x.Key, x.Count, TimeSpan.FromMilliseconds(x.DurationMs), x.Name)) @@ -104,6 +105,11 @@ public sealed class DashboardQueries(IDbContextFactory dbCont events = events.Where(e => e.Target == target); } + if (filter.Strategy is { } strategy) + { + events = events.Where(e => e.Strategy == strategy); + } + if (!string.IsNullOrWhiteSpace(filter.Search)) { var pattern = $"%{filter.Search.Trim().Replace("\\", "\\\\").Replace("%", "\\%").Replace("_", "\\_")}%"; @@ -111,6 +117,7 @@ public sealed class DashboardQueries(IDbContextFactory dbCont EF.Functions.Like(e.RemoteIp, pattern, "\\") || EF.Functions.Like(e.Provider!, pattern, "\\") || EF.Functions.Like(e.Target!, pattern, "\\") + || EF.Functions.Like(e.Strategy, pattern, "\\") || EF.Functions.Like(e.ClientInfo!, pattern, "\\")); } diff --git a/src/Flypaper.Storage/Dashboard/RecentFilter.cs b/src/Flypaper.Storage/Dashboard/RecentFilter.cs index 8fbc415..8ffdedf 100644 --- a/src/Flypaper.Storage/Dashboard/RecentFilter.cs +++ b/src/Flypaper.Storage/Dashboard/RecentFilter.cs @@ -10,6 +10,7 @@ public sealed record RecentFilter( long? Asn = null, string? Ip = null, string? Target = null, + string? Strategy = null, string? Search = null, int Limit = RecentFilter.DefaultLimit) { diff --git a/src/Flypaper.Storage/Queries/CatchQueries.cs b/src/Flypaper.Storage/Queries/CatchQueries.cs index e5853e6..9549a0c 100644 --- a/src/Flypaper.Storage/Queries/CatchQueries.cs +++ b/src/Flypaper.Storage/Queries/CatchQueries.cs @@ -93,6 +93,8 @@ public sealed class CatchQueries(IDbContextFactory dbContextF .Select(g => new TopRow { Key = "AS" + g.Key.ToString(), Label = g.Max(e => e.Provider), Count = g.Count(), DurationMs = g.Sum(e => e.DurationMs) }), TopDimension.Targets => catches.Where(e => e.Target != null).GroupBy(e => e.Target!) .Select(g => new TopRow { Key = g.Key, Count = g.Count(), DurationMs = g.Sum(e => e.DurationMs) }), + TopDimension.Strategies => catches.GroupBy(e => e.Strategy) + .Select(g => new TopRow { Key = g.Key, Count = g.Count(), DurationMs = g.Sum(e => e.DurationMs) }), TopDimension.UserAgents => catches.Where(e => e.ClientInfo != null).GroupBy(e => e.ClientInfo!) .Select(g => new TopRow { Key = g.Key, Count = g.Count(), DurationMs = g.Sum(e => e.DurationMs) }), _ => throw new ArgumentOutOfRangeException(nameof(dimension)) diff --git a/src/Flypaper.Storage/Queries/CatchRecords.cs b/src/Flypaper.Storage/Queries/CatchRecords.cs index e290477..d4c7fa5 100644 --- a/src/Flypaper.Storage/Queries/CatchRecords.cs +++ b/src/Flypaper.Storage/Queries/CatchRecords.cs @@ -42,6 +42,7 @@ public enum TopDimension Countries, Providers, Targets, + Strategies, UserAgents } diff --git a/src/Flypaper.Web/Components/Pages/Dashboard/DashboardFilter.cs b/src/Flypaper.Web/Components/Pages/Dashboard/DashboardFilter.cs index 3cf9372..85505a6 100644 --- a/src/Flypaper.Web/Components/Pages/Dashboard/DashboardFilter.cs +++ b/src/Flypaper.Web/Components/Pages/Dashboard/DashboardFilter.cs @@ -12,6 +12,7 @@ public sealed record DashboardFilter( string? Provider = null, string? Ip = null, string? Ziel = null, + string? Strategie = null, string? Q = null, int Limit = RecentFilter.DefaultLimit) { @@ -31,6 +32,7 @@ public sealed record DashboardFilter( string? provider, string? ip, string? ziel, + string? strategie, string? q, string? limit) { @@ -45,6 +47,7 @@ public sealed record DashboardFilter( Asn(provider) is { } asn ? $"AS{asn.ToString(CultureInfo.InvariantCulture)}" : null, IPAddress.TryParse(Clean(ip), out var address) ? address.ToString() : null, Clean(ziel), + Clean(strategie), Clean(q), parsedLimit); } @@ -67,6 +70,7 @@ public sealed record DashboardFilter( Asn(Provider), Ip, Ziel, + Strategie, Q, Limit); @@ -81,6 +85,7 @@ public sealed record DashboardFilter( Add(parts, "provider", Provider); Add(parts, "ip", Ip); Add(parts, "ziel", Ziel); + Add(parts, "strategie", Strategie); Add(parts, "q", Q); if (Limit != RecentFilter.DefaultLimit) { diff --git a/src/Flypaper.Web/Components/Pages/Dashboard/DashboardPage.razor b/src/Flypaper.Web/Components/Pages/Dashboard/DashboardPage.razor index 9ddaa92..e6b627c 100644 --- a/src/Flypaper.Web/Components/Pages/Dashboard/DashboardPage.razor +++ b/src/Flypaper.Web/Components/Pages/Dashboard/DashboardPage.razor @@ -127,9 +127,9 @@ - @foreach (var (name, value) in new[] { ("provider", _filter.Provider), ("ip", _filter.Ip), ("ziel", _filter.Ziel) }) + @foreach (var (name, value) in new[] { ("provider", _filter.Provider), ("ip", _filter.Ip), ("ziel", _filter.Ziel), ("strategie", _filter.Strategie) }) { if (value is not null) { @@ -163,6 +163,7 @@ Herkunft Provider Ziel + Strategie User-Agent Dauer Bytes @@ -194,11 +195,13 @@ @target
Provider: @(provider ?? "–")
+
Strategie: @trapEvent.Strategy
User-Agent: @(trapEvent.ClientInfo ?? "–")
Herkunft: @(trapEvent.CountryCode is { } code ? $"{Formatting.Flag(code)} {code} · {Origin(trapEvent)}" : "–")
Dauer: @duration · Bytes: @bytes
Datum: @started.ToString("dd.MM.yyyy") · Ausgang: @OutcomeLabel(trapEvent.Outcome)
+ @trapEvent.Strategy @trapEvent.ClientInfo @duration @bytes @@ -247,13 +250,15 @@ [SupplyParameterFromQuery(Name = "ziel")] public string? Ziel { get; set; } + [SupplyParameterFromQuery(Name = "strategie")] public string? Strategie { get; set; } + [SupplyParameterFromQuery(Name = "q")] public string? Q { get; set; } [SupplyParameterFromQuery(Name = "limit")] public string? Limit { get; set; } protected override async Task OnInitializedAsync() { - _filter = DashboardFilter.Parse(Zeit, Ausgang, Land, Provider, Ip, Ziel, Q, Limit); + _filter = DashboardFilter.Parse(Zeit, Ausgang, Land, Provider, Ip, Ziel, Strategie, Q, Limit); _data = await Queries.GetAsync(); _recent = await Queries.GetRecentAsync(_filter.ToRecentFilter()); _loadedAt = DateTime.Now; @@ -264,7 +269,8 @@ new("countries", "Länder", "Land", data.TopCountries, f => f.Land, (f, key) => f with { Land = key }, ShowFlags: true, LabelFormatter: CountryNames.Display), new("providers", "Provider", "Provider", data.TopProviders, f => f.Provider, (f, key) => f with { Provider = key }), new("ips", "IPs", "IP", data.TopIps, f => f.Ip, (f, key) => f with { Ip = key }), - new("targets", "Ziele", "Ziel", data.TopTargets, f => f.Ziel, (f, key) => f with { Ziel = key }, KeyFormatter: Formatting.Target) + new("targets", "Ziele", "Ziel", data.TopTargets, f => f.Ziel, (f, key) => f with { Ziel = key }, KeyFormatter: Formatting.Target), + new("strategies", "Strategien", "Strategie", data.TopStrategies, f => f.Strategie, (f, key) => f with { Strategie = key }) ]; private DashboardFilter TopFilter(TopTab tab, TopEntry entry) => @@ -306,6 +312,11 @@ yield return ($"Ziel: {Formatting.Target(ziel)}", reset with { Ziel = null }); } + if (_filter.Strategie is { } strategie) + { + yield return ($"Strategie: {strategie}", reset with { Strategie = null }); + } + if (_filter.Q is { } q) { yield return ($"Suche: „{q}“", reset with { Q = null }); diff --git a/src/Flypaper.Web/Mcp/FlypaperTools.cs b/src/Flypaper.Web/Mcp/FlypaperTools.cs index aeebf2d..7a8851c 100644 --- a/src/Flypaper.Web/Mcp/FlypaperTools.cs +++ b/src/Flypaper.Web/Mcp/FlypaperTools.cs @@ -62,8 +62,8 @@ public sealed class FlypaperTools(CatchQueries queries, IConnectionGovernor gove [McpServerTool(Name = "top", Title = "Top values", ReadOnly = true, Destructive = false, Idempotent = true, OpenWorld = false, UseStructuredContent = true)] [Description("Most frequent values among the catches of a time window, by number of catches. Rejected connections are not counted.")] public async Task Top( - [Description("What to rank by: ips, countries, providers, targets or user_agents.")] - [AllowedValues("ips", "countries", "providers", "targets", "user_agents")] + [Description("What to rank by: ips, countries, providers, targets, strategies or user_agents.")] + [AllowedValues("ips", "countries", "providers", "targets", "strategies", "user_agents")] string dimension, [Description(PeriodDescription)] string period = "24h", [Description("Number of entries, 1 to 500.")] int limit = 10, @@ -75,8 +75,9 @@ public sealed class FlypaperTools(CatchQueries queries, IConnectionGovernor gove "countries" => TopDimension.Countries, "providers" => TopDimension.Providers, "targets" => TopDimension.Targets, + "strategies" => TopDimension.Strategies, "user_agents" => TopDimension.UserAgents, - _ => throw new McpException("dimension must be one of ips, countries, providers, targets, user_agents.") + _ => throw new McpException("dimension must be one of ips, countries, providers, targets, strategies, user_agents.") }; var items = await queries.TopAsync(parsed, Since(period), limit, ct); diff --git a/src/Flypaper.Web/wwwroot/app.css b/src/Flypaper.Web/wwwroot/app.css index c6aa1e4..5700c68 100644 --- a/src/Flypaper.Web/wwwroot/app.css +++ b/src/Flypaper.Web/wwwroot/app.css @@ -464,6 +464,10 @@ a.button:hover { width: 116px; } +.recent-table .c-strategy { + width: 190px; +} + .recent-table .extra { display: none; margin-top: 4px; @@ -474,6 +478,7 @@ a.button:hover { @media (max-width: 1199px) { .recent-table .c-provider, + .recent-table .c-strategy, .recent-table .c-agent { display: none; } diff --git a/test/Flypaper.Tests/Mcp/FlypaperToolsTests.cs b/test/Flypaper.Tests/Mcp/FlypaperToolsTests.cs index 8019961..0c3e76e 100644 --- a/test/Flypaper.Tests/Mcp/FlypaperToolsTests.cs +++ b/test/Flypaper.Tests/Mcp/FlypaperToolsTests.cs @@ -98,6 +98,7 @@ public sealed class FlypaperToolsTests : IDisposable [InlineData("countries", "CN", 2)] [InlineData("providers", "AS4134", 2)] [InlineData("targets", "GET /.env", 1)] + [InlineData("strategies", "html-drip", 4)] [InlineData("user_agents", "zgrab/0.x", 2)] public async Task Top_ranks_each_dimension(string dimension, string firstKey, int firstCount) { diff --git a/test/Flypaper.Tests/Mcp/McpEndpointTests.cs b/test/Flypaper.Tests/Mcp/McpEndpointTests.cs index 3dd3739..179254c 100644 --- a/test/Flypaper.Tests/Mcp/McpEndpointTests.cs +++ b/test/Flypaper.Tests/Mcp/McpEndpointTests.cs @@ -119,8 +119,8 @@ public sealed class McpEndpointTests : IDisposable } [Theory] - [InlineData("top", """{"by":"countries","period":"all"}""", "unknown parameter 'by'; expected 'dimension' (ips|countries|providers|targets|user_agents)")] - [InlineData("top", """{"period":"all"}""", "missing required parameter 'dimension' (ips|countries|providers|targets|user_agents)")] + [InlineData("top", """{"by":"countries","period":"all"}""", "unknown parameter 'by'; expected 'dimension' (ips|countries|providers|targets|strategies|user_agents)")] + [InlineData("top", """{"period":"all"}""", "missing required parameter 'dimension' (ips|countries|providers|targets|strategies|user_agents)")] [InlineData("list_catches", """{"countryCode":"GB"}""", "unknown parameter 'countryCode'")] public async Task Invalid_arguments_return_a_readable_tool_error(string tool, string arguments, string expected) { diff --git a/test/Flypaper.Tests/Mcp/McpTestData.cs b/test/Flypaper.Tests/Mcp/McpTestData.cs index baccf46..384b871 100644 --- a/test/Flypaper.Tests/Mcp/McpTestData.cs +++ b/test/Flypaper.Tests/Mcp/McpTestData.cs @@ -19,11 +19,11 @@ internal sealed class McpTestData : IDisposable using var db = Factory.CreateDbContext(); db.Database.Migrate(); - Add(db, "203.0.113.9", hoursAgo: 1, seconds: 3600, "CN", "Volksrepublik China", "Beijing", 4134, "Chinanet", "GET /.env", "zgrab/0.x"); + Add(db, "203.0.113.9", hoursAgo: 1, seconds: 3600, "CN", "Volksrepublik China", "Beijing", 4134, "Chinanet", "GET /.env", "zgrab/0.x", strategy: "env-drip"); Add(db, "203.0.113.9", hoursAgo: 2, seconds: 120, "CN", "Volksrepublik China", "Beijing", 4134, "Chinanet", "GET example.com/wp-login.php", "zgrab/0.x"); Add(db, "198.51.100.7", hoursAgo: 3, seconds: 30, "TW", "Republik China", "Taipeh", 3462, "Data Communication Business Group", "GET /.git/config", "curl/8.5.0"); Add(db, "2001:db8::1", hoursAgo: 30, seconds: 900, "US", "Vereinigte Staaten von Amerika", "Mountain View", 15169, "Google LLC", "POST /xmlrpc.php", "python-requests/2.31"); - Add(db, "198.51.100.7", hoursAgo: 4, seconds: 0, "TW", "Republik China", "Taipeh", 3462, "Data Communication Business Group", "GET /.env", "curl/8.5.0", TrapOutcome.Rejected); + Add(db, "198.51.100.7", hoursAgo: 4, seconds: 0, "TW", "Republik China", "Taipeh", 3462, "Data Communication Business Group", "GET /.env", "curl/8.5.0", TrapOutcome.Rejected, "env-drip"); Add(db, "192.0.2.50", hoursAgo: 200, seconds: 5, null, null, null, null, null, "GET /", null); db.SaveChanges(); } @@ -44,14 +44,15 @@ internal sealed class McpTestData : IDisposable string? provider, string target, string? userAgent, - TrapOutcome outcome = TrapOutcome.ClientAborted) + TrapOutcome outcome = TrapOutcome.ClientAborted, + string strategy = "html-drip") { var started = Now.AddHours(-hoursAgo); var entity = TrapEventEntity.From(new TrapEvent( Guid.NewGuid(), TrapProtocol.Http, IPAddress.Parse(ip), - "html-drip", + strategy, started, started.AddSeconds(seconds), seconds * 10, diff --git a/test/Flypaper.Tests/Storage/RecentCatchesTests.cs b/test/Flypaper.Tests/Storage/RecentCatchesTests.cs index 5986e66..67667b3 100644 --- a/test/Flypaper.Tests/Storage/RecentCatchesTests.cs +++ b/test/Flypaper.Tests/Storage/RecentCatchesTests.cs @@ -44,13 +44,32 @@ public sealed class RecentCatchesTests : IDisposable recent.Total.ShouldBe(expected); } + [Fact] + public async Task Matches_strategy_exactly() + { + var recent = await _queries.GetRecentAsync(new RecentFilter(Strategy: "env-drip")); + + recent.Total.ShouldBe(2); + recent.Items.ShouldAllBe(e => e.Strategy == "env-drip"); + } + + [Fact] + public async Task Dashboard_ranks_strategies_among_catches() + { + var data = await _queries.GetAsync(); + + data.TopStrategies.Select(s => (s.Key, s.Count)).ShouldBe([("html-drip", 4), ("env-drip", 1)]); + data.TopStrategies[1].HoldTime.ShouldBe(TimeSpan.FromHours(1)); + } + [Theory] [InlineData("chinanet", 2)] + [InlineData("env-drip", 2)] [InlineData("CURL", 2)] [InlineData("198.51", 2)] [InlineData("wp-login", 1)] [InlineData("100%", 0)] - public async Task Search_is_case_insensitive_over_ip_provider_target_and_user_agent(string search, int expected) + public async Task Search_is_case_insensitive_over_ip_provider_target_strategy_and_user_agent(string search, int expected) { var recent = await _queries.GetRecentAsync(new RecentFilter(Search: search)); diff --git a/test/Flypaper.Tests/Web/DashboardFilterTests.cs b/test/Flypaper.Tests/Web/DashboardFilterTests.cs index b9ce22e..7d8b9c6 100644 --- a/test/Flypaper.Tests/Web/DashboardFilterTests.cs +++ b/test/Flypaper.Tests/Web/DashboardFilterTests.cs @@ -10,10 +10,10 @@ public sealed class DashboardFilterTests [Fact] public void Parses_all_parameters() { - var filter = DashboardFilter.Parse("24h", "Abgelehnt", "hk", "as4134", " 203.0.113.9 ", "GET /.env", " wp ", "100"); + var filter = DashboardFilter.Parse("24h", "Abgelehnt", "hk", "as4134", " 203.0.113.9 ", "GET /.env", " env-drip ", " wp ", "100"); - filter.ShouldBe(new DashboardFilter("24h", "abgelehnt", "HK", "AS4134", "203.0.113.9", "GET /.env", "wp", 100)); - filter.ToRecentFilter().ShouldBe(new RecentFilter(TimeSpan.FromHours(24), TrapOutcome.Rejected, "HK", 4134, "203.0.113.9", "GET /.env", "wp", 100)); + filter.ShouldBe(new DashboardFilter("24h", "abgelehnt", "HK", "AS4134", "203.0.113.9", "GET /.env", "env-drip", "wp", 100)); + filter.ToRecentFilter().ShouldBe(new RecentFilter(TimeSpan.FromHours(24), TrapOutcome.Rejected, "HK", 4134, "203.0.113.9", "GET /.env", "env-drip", "wp", 100)); } [Theory] @@ -21,12 +21,12 @@ public sealed class DashboardFilterTests [InlineData("zeitlimit", TrapOutcome.Timeout)] [InlineData("abgelehnt", TrapOutcome.Rejected)] public void Maps_outcomes(string value, TrapOutcome expected) => - DashboardFilter.Parse(null, value, null, null, null, null, null, null).ToRecentFilter().Outcome.ShouldBe(expected); + DashboardFilter.Parse(null, value, null, null, null, null, null, null, null).ToRecentFilter().Outcome.ShouldBe(expected); [Fact] public void Ignores_invalid_values() { - var filter = DashboardFilter.Parse("gestern", "kaputt", "Hongkong", "Chinanet", "not-an-ip", " ", "", "viele"); + var filter = DashboardFilter.Parse("gestern", "kaputt", "Hongkong", "Chinanet", "not-an-ip", " ", " ", "", "viele"); filter.ShouldBe(new DashboardFilter()); filter.IsEmpty.ShouldBeTrue(); @@ -38,23 +38,23 @@ public sealed class DashboardFilterTests [InlineData("100000", RecentFilter.MaxLimit)] [InlineData(null, RecentFilter.DefaultLimit)] public void Clamps_the_limit(string? limit, int expected) => - DashboardFilter.Parse(null, null, null, null, null, null, null, limit).Limit.ShouldBe(expected); + DashboardFilter.Parse(null, null, null, null, null, null, null, null, limit).Limit.ShouldBe(expected); [Fact] public void Builds_links_without_defaults_and_with_escaping() { new DashboardFilter().Href().ShouldBe("/#faenge"); - new DashboardFilter(Land: "CN", Ziel: "GET example.com/a&b", Limit: 100).Href("f50") - .ShouldBe("/?land=CN&ziel=GET%20example.com%2Fa%26b&limit=100#f50"); + new DashboardFilter(Land: "CN", Ziel: "GET example.com/a&b", Strategie: "html-drip 50-500ms 1-1024B", Limit: 100).Href("f50") + .ShouldBe("/?land=CN&ziel=GET%20example.com%2Fa%26b&strategie=html-drip%2050-500ms%201-1024B&limit=100#f50"); } [Fact] public void Links_round_trip() { - var filter = new DashboardFilter("7d", "zeitlimit", "TW", "AS3462", "2001:db8::1", "POST /xmlrpc.php", "curl", 200); + var filter = new DashboardFilter("7d", "zeitlimit", "TW", "AS3462", "2001:db8::1", "POST /xmlrpc.php", "hikvision-drip", "curl", 200); var query = Microsoft.AspNetCore.WebUtilities.QueryHelpers.ParseQuery(new Uri("http://x" + filter.Href()).Query); - DashboardFilter.Parse(query["zeit"], query["ausgang"], query["land"], query["provider"], query["ip"], query["ziel"], query["q"], query["limit"]) + DashboardFilter.Parse(query["zeit"], query["ausgang"], query["land"], query["provider"], query["ip"], query["ziel"], query["strategie"], query["q"], query["limit"]) .ShouldBe(filter); }