feat!: pre-handshake knock on the agent TCP ports; probes get the agent certificate public key [CI]
ci/woodpecker/push/main-amd64-build Pipeline was successful

This commit is contained in:
justme committed 2026-10-07 18:56:40 +08:00
1 parent f03988d68b
commit b99b95c738
31 files changed
+539 -61

No files matched your search

@@ -5,7 +5,7 @@ namespace MoShiro.Backend.Storage.Sqlite;
/// <summary>表结构。版本记录在 <c>PRAGMA user_version</c>;以后的迁移是按版本号追加的内置 SQL。</summary>
internal static class Schema
{
public const int CurrentVersion = 9;
public const int CurrentVersion = 10;
public static void Migrate(SqliteConnection connection)
{
@@ -131,6 +131,15 @@ internal static class Schema
connection.Exec("PRAGMA user_version = 9");
transaction.Commit();
}
if (version < 10)
{
// 预握手敲门:Probe 需要 Agent 的证书公钥(不只是指纹)来派生配对密钥,由 Agent 在 hello 里上报
using SqliteTransaction transaction = connection.BeginTransaction();
connection.Exec("ALTER TABLE agents ADD COLUMN tls_pubkey BLOB");
connection.Exec("PRAGMA user_version = 10");
transaction.Commit();
}
}
/// <summary>