use crate::fingerprint::detection::{Detection, Tier};
use crate::fingerprint::target::TargetContext;
use super::Source;
#[derive(Default)]
pub struct H2SettingsSource;
impl H2SettingsSource {
pub fn new() -> Self {
Self
}
}
impl Source for H2SettingsSource {
fn name(&self) -> &'static str {
"h2_settings"
}
fn tier(&self) -> Tier {
Tier::Warm
}
fn analyze(&self, _ctx: &TargetContext<'_>) -> Vec<Detection> {
Vec::new()
}
}
#[cfg(test)]
mod tests {
use super::*;
use http::HeaderMap;
use url::Url;
#[test]
fn empty_until_target_context_widens() {
let h = HeaderMap::new();
let u: Url = "https://example.com/".parse().unwrap();
let ctx = TargetContext::http_only(&u, 200, &h, b"");
assert!(H2SettingsSource::new().analyze(&ctx).is_empty());
}
}