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§
Source§impl GunnarWireGuard
impl GunnarWireGuard
pub fn new(root: &Path, _seed: &Seed) -> GunnarWireGuard
Trait Implementations§
Source§impl Tunnel for GunnarWireGuard
impl Tunnel for GunnarWireGuard
Source§fn public_key(&self) -> String
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>
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.
fn kind(&self) -> TunnelKind
Source§fn add_peer(&mut self, _peer: &Peer) -> Result<(), TunnelError>
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).fn status(&self) -> TunnelStatus
Source§fn repoint(
&mut self,
me: &Identity,
peers: &[Peer],
) -> Result<bool, TunnelError>
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).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>
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§
impl Freeze for GunnarWireGuard
impl RefUnwindSafe for GunnarWireGuard
impl Send for GunnarWireGuard
impl Sync for GunnarWireGuard
impl Unpin for GunnarWireGuard
impl UnsafeUnpin for GunnarWireGuard
impl UnwindSafe for GunnarWireGuard
Blanket Implementations§
impl<T> Allocation for T
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request