pub struct RelayConfig {Show 13 fields
pub base_domain: String,
pub listen_addr: SocketAddr,
pub request_timeout: Duration,
pub max_tunnels_per_ip: usize,
pub use_https: bool,
pub auth_tokens: HashSet<String>,
pub require_auth: bool,
pub jwt_secret: Option<Vec<u8>>,
pub jwt_validity: Duration,
pub auth_rate_limit: AuthRateLimitConfig,
pub max_tunnel_age: Option<Duration>,
pub max_idle_time: Option<Duration>,
pub allow_custom_ids: bool,
}Expand description
Relay server configuration
Fields§
§base_domain: StringBase domain for tunnels (e.g., “relay.example.com”)
listen_addr: SocketAddrListen address
request_timeout: DurationRequest timeout
max_tunnels_per_ip: usizeMaximum tunnels per IP (rate limiting)
use_https: boolWhether to use HTTPS for tunnel URLs
auth_tokens: HashSet<String>Valid API tokens for authentication (empty = no auth required)
require_auth: boolWhether authentication is required
jwt_secret: Option<Vec<u8>>JWT secret for token-based auth (None = use simple token matching)
jwt_validity: DurationJWT token validity duration
auth_rate_limit: AuthRateLimitConfigAuth rate limiting configuration
max_tunnel_age: Option<Duration>Maximum tunnel age (TTL) - tunnels older than this are closed None = no limit (tunnels live until disconnected)
max_idle_time: Option<Duration>Maximum idle time before tunnel is closed None = no idle timeout
allow_custom_ids: boolAllow custom tunnel IDs (if false, only random IDs are allowed) Set to false for public relays to prevent subdomain squatting
Trait Implementations§
Source§impl Clone for RelayConfig
impl Clone for RelayConfig
Source§fn clone(&self) -> RelayConfig
fn clone(&self) -> RelayConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RelayConfig
impl Debug for RelayConfig
Auto Trait Implementations§
impl Freeze for RelayConfig
impl RefUnwindSafe for RelayConfig
impl Send for RelayConfig
impl Sync for RelayConfig
impl Unpin for RelayConfig
impl UnsafeUnpin for RelayConfig
impl UnwindSafe for RelayConfig
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