refine deps
This commit is contained in:
parent
45895ca7bc
commit
66e791f34b
11 changed files with 85 additions and 65 deletions
|
|
@ -157,25 +157,29 @@ pub fn parse_opts(globals: &mut Globals) -> Result<()> {
|
|||
|
||||
// experimental
|
||||
if let Some(exp) = config.experimental {
|
||||
if let Some(h3option) = exp.h3 {
|
||||
globals.http3 = true;
|
||||
info!("Experimental HTTP/3.0 is enabled. Note it is still very unstable.");
|
||||
if let Some(x) = h3option.alt_svc_max_age {
|
||||
globals.h3_alt_svc_max_age = x;
|
||||
}
|
||||
if let Some(x) = h3option.request_max_body_size {
|
||||
globals.h3_request_max_body_size = x;
|
||||
}
|
||||
if let Some(x) = h3option.max_concurrent_connections {
|
||||
globals.h3_max_concurrent_connections = x;
|
||||
}
|
||||
if let Some(x) = h3option.max_concurrent_bidistream {
|
||||
globals.h3_max_concurrent_bidistream = x.into();
|
||||
}
|
||||
if let Some(x) = h3option.max_concurrent_unistream {
|
||||
globals.h3_max_concurrent_unistream = x.into();
|
||||
#[cfg(feature = "http3")]
|
||||
{
|
||||
if let Some(h3option) = exp.h3 {
|
||||
globals.http3 = true;
|
||||
info!("Experimental HTTP/3.0 is enabled. Note it is still very unstable.");
|
||||
if let Some(x) = h3option.alt_svc_max_age {
|
||||
globals.h3_alt_svc_max_age = x;
|
||||
}
|
||||
if let Some(x) = h3option.request_max_body_size {
|
||||
globals.h3_request_max_body_size = x;
|
||||
}
|
||||
if let Some(x) = h3option.max_concurrent_connections {
|
||||
globals.h3_max_concurrent_connections = x;
|
||||
}
|
||||
if let Some(x) = h3option.max_concurrent_bidistream {
|
||||
globals.h3_max_concurrent_bidistream = x.into();
|
||||
}
|
||||
if let Some(x) = h3option.max_concurrent_unistream {
|
||||
globals.h3_max_concurrent_unistream = x.into();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(b) = exp.ignore_sni_consistency {
|
||||
globals.sni_consistency = !b;
|
||||
if b {
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ pub struct ConfigToml {
|
|||
pub experimental: Option<Experimental>,
|
||||
}
|
||||
|
||||
#[cfg(feature = "http3")]
|
||||
#[derive(Deserialize, Debug, Default)]
|
||||
pub struct Http3Option {
|
||||
pub alt_svc_max_age: Option<u32>,
|
||||
|
|
@ -26,6 +27,7 @@ pub struct Http3Option {
|
|||
|
||||
#[derive(Deserialize, Debug, Default)]
|
||||
pub struct Experimental {
|
||||
#[cfg(feature = "http3")]
|
||||
pub h3: Option<Http3Option>,
|
||||
pub ignore_sni_consistency: Option<bool>,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue