using System; namespace VanadiumGuard.Protocol { /// /// Everything the client needs in order to know what to look for, delivered by the /// server at session open. /// /// Shipping this from the server rather than compiling it in is the single most useful /// operational property of the whole design: a detector that starts producing false /// positives in production can be turned off, or dropped to observe-only, without /// shipping a new DLL to every player. /// /// public sealed class GuardPolicy { /// Identifies this policy revision. Echoed back on every report. public string PolicyVersion { get; set; } = "0"; public int ReportIntervalMs { get; set; } = 5000; public int HeartbeatIntervalMs { get; set; } = 15000; /// Per-detector switches, keyed by detector name. Missing means disabled. public DetectorSettings[] Detectors { get; set; } = Array.Empty(); /// Substrings matched against loaded module base names. public string[] ModuleDenyList { get; set; } = Array.Empty(); /// Module name prefixes that are always fine, checked before the deny list. public string[] ModuleAllowPrefixes { get; set; } = Array.Empty(); /// Directory prefixes whose modules are trusted, in lowercase. public string[] TrustedPathPrefixes { get; set; } = Array.Empty(); /// /// Exact process image names, lowercase with extension. Exact match only - substring /// matching is what made the old build kill players for running Regedit. /// public string[] ProcessDenyList { get; set; } = Array.Empty(); /// Window class names requiring an accompanying title match to count. public string[] WindowClassDenyList { get; set; } = Array.Empty(); /// Window title substrings. Matched case-insensitively. public string[] WindowTitleDenyList { get; set; } = Array.Empty(); /// Native exports whose prologues are snapshotted and re-verified. public WatchedExport[] WatchedExports { get; set; } = Array.Empty(); /// IL2CPP methods to watch for inline hooks. public Il2CppTarget[] Il2CppTargets { get; set; } = Array.Empty(); /// Harmony patch owner ids that are expected and allowed. public string[] AllowedPatchOwners { get; set; } = Array.Empty(); /// Modules the server is permitted to issue memory challenges against. public string[] ChallengeableModules { get; set; } = Array.Empty(); } public sealed class DetectorSettings { public string Name { get; set; } = string.Empty; public bool Enabled { get; set; } = true; /// Overrides the detector default. Zero means use the default. public int IntervalMs { get; set; } /// /// Caps the confidence of everything this detector emits. Set to 0 to keep a /// detector running and reporting while contributing nothing to any verdict, /// which is how a new heuristic should always be rolled out. /// public int MaxConfidence { get; set; } = 100; } public sealed class WatchedExport { public string Module { get; set; } = string.Empty; public string Export { get; set; } = string.Empty; } public sealed class Il2CppTarget { public string TypeName { get; set; } = string.Empty; public string MethodName { get; set; } = string.Empty; public int ParameterCount { get; set; } } }