pub struct NativeGatewayConfig {
pub enabled: bool,
pub runtime: GatewayConfig,
pub interface_name: Option<String>,
pub route_ledger_path: String,
pub unix_helper_socket: String,
pub wintun_dll_path: Option<String>,
pub status_refresh_secs: u64,
}Expand description
Native foreground-gateway configuration: the gateway: section of the node config file.
rings init writes this section in full through NativeGatewayConfig::disabled_default,
so the generated file is the one place an operator edits and rings run --gateway works on
it unchanged. Presence of the section is not consent to start a TUN device:
gateway starts ⟺ section present ∧ (enabled = true ∨ --gateway)A section that omits enabled is inert, and a config without the section loads
with gateway = None.
Fields§
§enabled: boolWhether plain rings run starts the gateway. Absent means false; only an explicit
enabled: true or rings run --gateway starts a TUN device.
runtime: GatewayConfigPlatform-neutral routing, TCP, and flow limits.
interface_name: Option<String>Requested Wintun interface name; on Unix the helper’s --interface is authoritative.
route_ledger_path: StringDurable journal used directly on Windows; on Unix the helper’s --ledger is authoritative.
unix_helper_socket: StringForeground gateway-config-unix control socket on Linux and macOS.
wintun_dll_path: Option<String>Optional explicit Wintun DLL path on Windows; overrides RINGS_GATEWAY_WINTUN_DLL.
status_refresh_secs: u64Interval for refreshing Onion exit availability in gateway status.
Implementations§
Source§impl NativeGatewayConfig
impl NativeGatewayConfig
Sourcepub fn disabled_default() -> Self
pub fn disabled_default() -> Self
The section rings init writes: the gateway crate’s interface-only plan under its default
limits, the node’s default paths, and enabled: false, with every field stated so the
generated file documents the whole surface. Optional fields are written as null.
Sourcepub fn to_yaml_section(&self) -> Result<String>
pub fn to_yaml_section(&self) -> Result<String>
Render this section as the top-level gateway: mapping of a config file, so a message
telling an operator what to add quotes the shape rings init writes rather than a copy.
Trait Implementations§
Source§impl Clone for NativeGatewayConfig
impl Clone for NativeGatewayConfig
Source§impl Debug for NativeGatewayConfig
impl Debug for NativeGatewayConfig
Source§impl<'de> Deserialize<'de> for NativeGatewayConfig
impl<'de> Deserialize<'de> for NativeGatewayConfig
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>,
Auto Trait Implementations§
impl Forget for NativeGatewayConfig
impl Freeze for NativeGatewayConfig
impl Move for NativeGatewayConfig
impl RefUnwindSafe for NativeGatewayConfig
impl Send for NativeGatewayConfig
impl Sync for NativeGatewayConfig
impl Unpin for NativeGatewayConfig
impl UnsafeUnpin for NativeGatewayConfig
impl UnwindSafe for NativeGatewayConfig
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T> MaybeSend for T
impl<T> MaybeSendSync for T
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.