make globals more simple
This commit is contained in:
parent
f8d37f7846
commit
fab28e8609
6 changed files with 261 additions and 228 deletions
|
|
@ -212,21 +212,13 @@ impl Backend {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
/// HashMap and some meta information for multiple Backend structs.
|
||||
pub struct Backends {
|
||||
pub apps: HashMap<ServerNameBytesExp, Backend>, // hyper::uriで抜いたhostで引っ掛ける
|
||||
pub default_server_name_bytes: Option<ServerNameBytesExp>, // for plaintext http
|
||||
}
|
||||
|
||||
impl Default for Backends {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
default_server_name_bytes: None,
|
||||
apps: HashMap::<ServerNameBytesExp, Backend>::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub type SniServerCryptoMap = HashMap<ServerNameBytesExp, Arc<ServerConfig>>;
|
||||
pub struct ServerCrypto {
|
||||
// For Quic/HTTP3, only servers with no client authentication
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue