agent: keep adaptive rate changes apart from the logs and report them in the heartbeat

This commit is contained in:
justme committed 2026-10-22 10:44:46 +08:00
1 parent 557b169dae
commit d63c3bff74
7 files changed
+128 -4

No files matched your search

@@ -245,6 +245,9 @@ public sealed class BlockEnv
/// <summary>单个 Agent 任务:解析出来的地址能不能连(本地 <c>allowed_target_cidrs</c>);null 表示不限制。</summary>
public Func<IPAddress, bool>? AllowAddress { get; init; }
/// <summary>自适应频率的状态变化(用于审计);null 表示不记录。</summary>
public Action<RateChange>? OnRateChange { get; init; }
/// <summary>拨号方:对端 TLS 证书的 SPKI 指纹;null 表示不校验证书(目标任务,目标是任意地址)。</summary>
public byte[]? PeerSpkiSha256 { get; init; }
@@ -277,6 +280,7 @@ public sealed class BlockEnv
PeerAddress = PeerAddress,
Target = Target,
AllowAddress = AllowAddress,
OnRateChange = OnRateChange,
PeerSpkiSha256 = PeerSpkiSha256,
KnockKey = KnockKey,
Fragments = Fragments,