pub struct ServerConfig {
pub control_port: Option<u16>,
pub http_port: Option<u16>,
pub base_domain: Option<String>,
pub cert: Option<String>,
pub key: Option<String>,
pub ca_cert: Option<String>,
pub cloudflare: Option<CloudflareConfig>,
pub tcp_port_range: Option<(u16, u16)>,
pub http_cert: Option<String>,
pub http_key: Option<String>,
}Expand description
Server configuration (parsed from TOML, can be overridden by env)
Fields§
§control_port: Option<u16>Port for control plane (mTLS client connections)
http_port: Option<u16>Port for HTTP data plane (traffic from Cloudflare)
base_domain: Option<String>Base domain for tunnels (e.g., “tunnel.example.com”)
cert: Option<String>Server certificate (file path, keychain://, op://, env://, or plain PEM)
key: Option<String>Server private key (file path, keychain://, op://, env://, or plain PEM)
ca_cert: Option<String>CA certificate for client verification (file path, keychain://, op://, env://, or plain PEM)
cloudflare: Option<CloudflareConfig>Cloudflare configuration
tcp_port_range: Option<(u16, u16)>TCP port range for TCP tunnels
http_cert: Option<String>HTTP plane certificate for TLS (optional - enables HTTPS if set)
http_key: Option<String>HTTP plane private key for TLS (optional - enables HTTPS if set)
Implementations§
Source§impl ServerConfig
impl ServerConfig
Trait Implementations§
Source§impl Debug for ServerConfig
impl Debug for ServerConfig
Source§impl Default for ServerConfig
impl Default for ServerConfig
Source§fn default() -> ServerConfig
fn default() -> ServerConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ServerConfigwhere
ServerConfig: Default,
impl<'de> Deserialize<'de> for ServerConfigwhere
ServerConfig: Default,
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 ServerConfig
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnwindSafe for ServerConfig
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