use bytesname trait to explicitly convert &str/string to ascii lower-cased byte names of server / path
This commit is contained in:
parent
4d590f328f
commit
7bd9040637
10 changed files with 49 additions and 46 deletions
|
|
@ -1,7 +1,10 @@
|
|||
mod upstream;
|
||||
mod upstream_opts;
|
||||
|
||||
use crate::log::*;
|
||||
use crate::{
|
||||
log::*,
|
||||
utils::{BytesName, PathNameBytesExp, ServerNameBytesExp},
|
||||
};
|
||||
use rustc_hash::FxHashMap as HashMap;
|
||||
use std::{
|
||||
fs::File,
|
||||
|
|
@ -17,11 +20,6 @@ use tokio_rustls::rustls::{
|
|||
pub use upstream::{ReverseProxy, Upstream, UpstreamGroup};
|
||||
pub use upstream_opts::UpstreamOption;
|
||||
|
||||
// Server name (hostname or ip address) and path name representation in backends
|
||||
// For searching hashmap or key list by exact or longest-prefix matching
|
||||
pub type ServerNameBytesExp = Vec<u8>; // lowercase ascii bytes
|
||||
pub type PathNameBytesExp = Vec<u8>; // lowercase ascii bytes
|
||||
|
||||
/// Struct serving information to route incoming connections, like server name to be handled and tls certs/keys settings.
|
||||
pub struct Backend {
|
||||
pub app_name: String,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue