Skip to main content

GunnarWireGuard

Struct GunnarWireGuard 

Source
pub struct GunnarWireGuard { /* private fields */ }
Expand description

gunnar’s WireGuard, behind the estate’s Tunnel trait — over crate::wg’s config lane (userspace boringtun in this process, the lane proven on the appliance). up writes wg0.conf for the assigned address with the key ensure_tunnel_key minted (the key the first join carried) and the FRONT as the one dialled peer owning the overlay, then raises it. Every other box is reached THROUGH the front’s relay, so add_peer has nothing to add here.

Implementations§

Trait Implementations§

Source§

impl Tunnel for GunnarWireGuard

Source§

fn public_key(&self) -> String

wg0.key’s public half — minted (0600) here if absent, so the FIRST join carries it.

Source§

fn up(&mut self, me: &Identity, peers: &[Peer]) -> Result<(), TunnelError>

The front is the peer the door FED with role front — its key and endpoint belong to the lay, not the medium. A reply without one is a transient failure named as such: the loop asks the door again.

Source§

fn kind(&self) -> TunnelKind

Source§

fn add_peer(&mut self, _peer: &Peer) -> Result<(), TunnelError>

A peer learned after up (the join reply names the ones that joined earlier; later joiners arrive through the front’s peer updates).
Source§

fn status(&self) -> TunnelStatus

Source§

fn repoint( &mut self, me: &Identity, peers: &[Peer], ) -> Result<bool, TunnelError>

Re-point a tunnel at these peers, in this process (0.5.17, A7 row 7; Gunnar 907f4f99 Tunnel::repoint): the front’s relay moved (a FRONT recharged onto new addresses) or was re-keyed, and a box re-fed after it dials the new relay at once, never after a restart. The running pump is stopped and the new one raised on the same interface and address; the box keeps its own key. Ok(true) when the dial changed, Ok(false) when it already dials these peers, or when no pump runs yet (the raise takes them). Default: handed to Tunnel::up (true).
Source§

fn set_preshared_key(&mut self, _psk: Option<&str>) -> Result<bool, TunnelError>

The pre-shared key of this box’s link to the front (0.5.17, A7 row 13; Gunnar 356e8dd2), as the installer fed it (crate::installer::FEED_WG_PSK, base64, 32 bytes), mixed into every handshake: WireGuard’s handshake is X25519 alone, and a key both ends hold — fed over the installer’s post-quantum TLS — is what a recording cannot be opened without. Ok(true) when it changed (a running pump takes it at once). A value that is not a key is refused by name, never quoted. Default: a driver with no such key (none, tailscale) takes nothing (false).
Source§

fn installer_reach(&self) -> Result<Reach, TunnelError>

How the installer reaches a VM of this kind during bootstrap (0.3.0): through its own WireGuard link (wireguard, mullvad), straight to the public address (none), or refused by name (tailscale). One answer per kind, crate::installer_link::reach; a driver overrides it only if its kind ever reaches otherwise.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more