Merge origin/main into claude/spelunk-tunnel

Port forwarding took host schema version 8 first, so the Spelunk route moves to 9 and is written after the forwards. A host may carry both.
This commit is contained in:
jaap-jan committed 2026-09-28 21:38:09 +02:00
commit 689ba6c1bf
44 files changed
+3187 -75

No files matched your search

@@ -21,11 +21,29 @@ internal static class HostFactory
/// <summary>A second tag id, for the tests about two people tagging one host.</summary>
internal static Guid EuWest { get; } = Guid.Parse("0192f0c8-9999-7c3d-8e4f-5a6b7c8d9e09");
/// <summary>A forward to the database, as the host would carry it.</summary>
internal static PortForwardRule Postgres { get; } = new()
{
Id = Guid.Parse("0192f0c8-aaaa-7c3d-8e4f-5a6b7c8d9e0a"),
Kind = PortForwardKind.Local,
BindPort = 5432,
TargetHost = "db.internal",
TargetPort = 5432,
};
/// <summary>A SOCKS forward, for the tests about two forwards on one host.</summary>
internal static PortForwardRule Socks { get; } = new()
{
Id = Guid.Parse("0192f0c8-bbbb-7c3d-8e4f-5a6b7c8d9e0b"),
Kind = PortForwardKind.Dynamic,
BindPort = 1080,
};
/// <summary>A credential holding a Spelunk API key, for the hosts reached through Spelunk.</summary>
internal static Guid SpelunkKey { get; } = Guid.Parse("0192f0c8-aaaa-7c3d-8e4f-5a6b7c8d9e0a");
internal static Guid SpelunkKey { get; } = Guid.Parse("0192f0c8-cccc-7c3d-8e4f-5a6b7c8d9e0c");
/// <summary>A server's id in Spelunk.</summary>
internal static Guid SpelunkServer { get; } = Guid.Parse("0192f0c8-bbbb-7c3d-8e4f-5a6b7c8d9e0b");
internal static Guid SpelunkServer { get; } = Guid.Parse("0192f0c8-dddd-7c3d-8e4f-5a6b7c8d9e0d");
/// <summary>A route to <see cref="SpelunkServer"/>, with <see cref="SpelunkKey"/>.</summary>
internal static SpelunkRoute ThroughSpelunk(string apiBase = "https://api.spelunk.example.com") =>
@@ -51,6 +69,7 @@ internal static class HostFactory
Guid? groupId = null,
Guid[]? tags = null,
string[]? pinnedPaths = null,
PortForwardRule[]? portForwards = null,
SpelunkRoute? spelunk = null) =>
new()
{
@@ -70,6 +89,7 @@ internal static class HostFactory
GroupId = groupId,
TagIds = tags is null ? TagSet.Empty : TagSet.Create(tags),
PinnedPaths = pinnedPaths is null ? PinnedPathList.Empty : PinnedPathList.Create(pinnedPaths),
PortForwards = portForwards is null ? PortForwardList.Empty : PortForwardList.Create(portForwards),
Spelunk = spelunk,
};