pub struct HqWgClientConfig {
pub interface_name: String,
pub private_key_path: PathBuf,
pub listen_port: u16,
pub hq_tunnel_address: IpAddr,
pub c2_tunnel_address: IpAddr,
pub control_port: u16,
pub drain_port: u16,
pub peers: Vec<HqWgPeer>,
}Expand description
HQ-side client configuration. Listen port must be 0.
Fields§
§interface_name: String§private_key_path: PathBuf§listen_port: u16§hq_tunnel_address: IpAddr§c2_tunnel_address: IpAddr§control_port: u16§drain_port: u16A2: port of the C2 restreamer drain listener on the tunnel IP.
peers: Vec<HqWgPeer>Implementations§
Source§impl HqWgClientConfig
impl HqWgClientConfig
pub fn validate(&self) -> Result<(), HqWgClientError>
Sourcepub fn control_addr(&self) -> Result<SocketAddr, HqWgClientError>
pub fn control_addr(&self) -> Result<SocketAddr, HqWgClientError>
c2_tunnel_ip:control_port. Never the public WireGuard endpoint.
Sourcepub fn drain_addr(&self) -> Result<SocketAddr, HqWgClientError>
pub fn drain_addr(&self) -> Result<SocketAddr, HqWgClientError>
c2_tunnel_ip:drain_port — core dials the restreamer drain over WG.
Trait Implementations§
Source§impl Clone for HqWgClientConfig
impl Clone for HqWgClientConfig
Source§impl Debug for HqWgClientConfig
impl Debug for HqWgClientConfig
impl Eq for HqWgClientConfig
Source§impl PartialEq for HqWgClientConfig
impl PartialEq for HqWgClientConfig
impl StructuralPartialEq for HqWgClientConfig
Auto Trait Implementations§
impl Freeze for HqWgClientConfig
impl RefUnwindSafe for HqWgClientConfig
impl Send for HqWgClientConfig
impl Sync for HqWgClientConfig
impl Unpin for HqWgClientConfig
impl UnsafeUnpin for HqWgClientConfig
impl UnwindSafe for HqWgClientConfig
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