pub struct WireGuardConfig<T: Tun, B: PlatformUDP>(/* private fields */);Implementations§
Source§impl<T: Tun, B: PlatformUDP> WireGuardConfig<T, B>
impl<T: Tun, B: PlatformUDP> WireGuardConfig<T, B>
pub fn new(wg: WireGuard<T, B>) -> WireGuardConfig<T, B>
Trait Implementations§
Source§impl<T: Tun, B: PlatformUDP> Clone for WireGuardConfig<T, B>
impl<T: Tun, B: PlatformUDP> Clone for WireGuardConfig<T, B>
Source§impl<T: Tun, B: PlatformUDP> Configuration for WireGuardConfig<T, B>
impl<T: Tun, B: PlatformUDP> Configuration for WireGuardConfig<T, B>
fn up(&self, mtu: usize) -> Result<(), ConfigError>
fn down(&self)
fn get_fwmark(&self) -> Option<u32>
Source§fn set_private_key(&self, sk: Option<StaticSecret>)
fn set_private_key(&self, sk: Option<StaticSecret>)
Updates the private key of the device Read more
Source§fn get_private_key(&self) -> Option<StaticSecret>
fn get_private_key(&self) -> Option<StaticSecret>
Returns the private key of the device Read more
Source§fn get_protocol_version(&self) -> usize
fn get_protocol_version(&self) -> usize
Returns the protocol version of the device Read more
fn get_listen_port(&self) -> Option<u16>
fn set_listen_port(&self, port: u16) -> Result<(), ConfigError>
Source§fn set_fwmark(&self, mark: Option<u32>) -> Result<(), ConfigError>
fn set_fwmark(&self, mark: Option<u32>) -> Result<(), ConfigError>
Set the firewall mark (or similar, depending on platform) Read more
Source§fn replace_peers(&self)
fn replace_peers(&self)
Removes all peers from the device
Source§fn remove_peer(&self, peer: &PublicKey)
fn remove_peer(&self, peer: &PublicKey)
Remove the peer from the Read more
Update the psk of a peer Read more
Source§fn set_endpoint(&self, peer: &PublicKey, addr: SocketAddr)
fn set_endpoint(&self, peer: &PublicKey, addr: SocketAddr)
Update the endpoint of the Read more
Source§fn set_persistent_keepalive_interval(&self, peer: &PublicKey, secs: u64)
fn set_persistent_keepalive_interval(&self, peer: &PublicKey, secs: u64)
Update the endpoint of the Read more
Source§fn replace_allowed_ips(&self, peer: &PublicKey)
fn replace_allowed_ips(&self, peer: &PublicKey)
Remove all allowed IPs from the peer Read more
Auto Trait Implementations§
impl<T, B> Freeze for WireGuardConfig<T, B>
impl<T, B> RefUnwindSafe for WireGuardConfig<T, B>
impl<T, B> Send for WireGuardConfig<T, B>
impl<T, B> Sync for WireGuardConfig<T, B>
impl<T, B> Unpin for WireGuardConfig<T, B>
impl<T, B> UnwindSafe for WireGuardConfig<T, B>
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