pub struct ServiceConfig {
pub tcp: HashMap<u16, TCPPortHandler>,
pub web: HashMap<String, WebServerConfig>,
pub tun: bool,
}Expand description
ServiceConfig contains the config information for a single service. it contains a bool to indicate if the service is in Tun mode (L3 forwarding). If the service is not in Tun mode, the service is configured by the L4 forwarding (TCP ports) and/or the L7 forwarding (http handlers) information.
Fields§
§tcp: HashMap<u16, TCPPortHandler>TCP are the list of TCP port numbers that tailscaled should handle for the Tailscale IP addresses. (not subnet routers, etc)
web: HashMap<String, WebServerConfig>Web maps from “$SNI_NAME:$PORT” to a set of HTTP handlers keyed by mount point (“/”, “/foo”, etc)
tun: boolTun determines if the service should be using L3 forwarding (Tun mode).
Trait Implementations§
Source§impl Clone for ServiceConfig
impl Clone for ServiceConfig
Source§fn clone(&self) -> ServiceConfig
fn clone(&self) -> ServiceConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServiceConfig
impl Debug for ServiceConfig
Source§impl Default for ServiceConfig
impl Default for ServiceConfig
Source§fn default() -> ServiceConfig
fn default() -> ServiceConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ServiceConfig
impl<'de> Deserialize<'de> for ServiceConfig
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 ServiceConfig
impl RefUnwindSafe for ServiceConfig
impl Send for ServiceConfig
impl Sync for ServiceConfig
impl Unpin for ServiceConfig
impl UnsafeUnpin for ServiceConfig
impl UnwindSafe for ServiceConfig
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