pub struct ServeConfig {
pub listen: String,
pub token: String,
pub tunnel: Vec<ServeTunnel>,
pub tenants_file: Option<String>,
pub sni_listen: Option<String>,
}Fields§
§listen: StringControl address A listens on, waiting for B (connect) to dial in.
token: StringShared secret for the single-tenant mode. Must be empty when
tenants_file is set.
tunnel: Vec<ServeTunnel>§tenants_file: Option<String>Multi-tenant mode: path of the tenant file. Each tenant has its own token and is reached by its own SNI host.
sni_listen: Option<String>Multi-tenant mode: address that accepts TLS connections and routes them
by SNI. Required with tenants_file, rejected without it.
Implementations§
Source§impl ServeConfig
impl ServeConfig
Sourcepub fn is_multi_tenant(&self) -> Result<bool>
pub fn is_multi_tenant(&self) -> Result<bool>
Whether this is the multi-tenant mode, after checking that the options of the two modes are not mixed.
Trait Implementations§
Source§impl Clone for ServeConfig
impl Clone for ServeConfig
Source§impl Debug for ServeConfig
impl Debug for ServeConfig
Source§impl Default for ServeConfig
impl Default for ServeConfig
Source§impl<'de> Deserialize<'de> for ServeConfig
impl<'de> Deserialize<'de> for ServeConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ServeConfig
impl RefUnwindSafe for ServeConfig
impl Send for ServeConfig
impl Sync for ServeConfig
impl Unpin for ServeConfig
impl UnsafeUnpin for ServeConfig
impl UnwindSafe for ServeConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more