add checking mechanism of consistency between sni and host/request line

This commit is contained in:
Jun Kurihara 2022-07-15 23:55:21 +09:00
commit d37ed57a1c
No known key found for this signature in database
GPG key ID: 48ADFD173ED22B03
11 changed files with 111 additions and 69 deletions

View file

@ -163,6 +163,12 @@ pub fn parse_opts(globals: &mut Globals) -> Result<()> {
info!("Experimental HTTP/3.0 is enabled. Note it is still very unstable.")
}
}
if let Some(b) = exp.ignore_sni_consistency {
globals.sni_consistency = !b;
if b {
info!("Ignore consistency between TLS SNI and Host header (or Request line). Note it violates RFC.")
}
}
}
Ok(())

View file

@ -18,6 +18,7 @@ pub struct ConfigToml {
#[derive(Deserialize, Debug, Default)]
pub struct Experimental {
pub h3: Option<bool>,
pub ignore_sni_consistency: Option<bool>,
}
#[derive(Deserialize, Debug, Default)]