pub struct NodeWgPeerConfig {
pub interface_name: String,
pub private_key_path: PathBuf,
pub listen_port: u16,
pub local_tunnel_address: IpAddr,
pub peer_tunnel_address: IpAddr,
pub peer_public_key: String,
pub peer_endpoint: Option<SocketAddr>,
pub persistent_keepalive_secs: u16,
}Fields§
§interface_name: String§private_key_path: PathBuf§listen_port: u160 means this side does not accept. Then Self::peer_endpoint is required.
local_tunnel_address: IpAddr§peer_tunnel_address: IpAddr§peer_public_key: String§peer_endpoint: Option<SocketAddr>C2’s public endpoint. None means C2 dials us, so Self::listen_port must be nonzero.
persistent_keepalive_secs: u16Implementations§
Source§impl NodeWgPeerConfig
impl NodeWgPeerConfig
pub fn validate(&self) -> Result<(), NodeWgPeerError>
Sourcepub fn peer_tunnel_socket(
&self,
control_port: u16,
) -> Result<SocketAddr, NodeWgPeerError>
pub fn peer_tunnel_socket( &self, control_port: u16, ) -> Result<SocketAddr, NodeWgPeerError>
TCP address of the C2 peer on the tunnel, for a later control dial. Not the public WireGuard endpoint.
Trait Implementations§
Source§impl Clone for NodeWgPeerConfig
impl Clone for NodeWgPeerConfig
Source§fn clone(&self) -> NodeWgPeerConfig
fn clone(&self) -> NodeWgPeerConfig
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 NodeWgPeerConfig
impl Debug for NodeWgPeerConfig
impl Eq for NodeWgPeerConfig
Source§impl PartialEq for NodeWgPeerConfig
impl PartialEq for NodeWgPeerConfig
impl StructuralPartialEq for NodeWgPeerConfig
Auto Trait Implementations§
impl Freeze for NodeWgPeerConfig
impl RefUnwindSafe for NodeWgPeerConfig
impl Send for NodeWgPeerConfig
impl Sync for NodeWgPeerConfig
impl Unpin for NodeWgPeerConfig
impl UnsafeUnpin for NodeWgPeerConfig
impl UnwindSafe for NodeWgPeerConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
Converts
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> ⓘ
Converts
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 more