pub struct SetPeer {
pub public_key: Option<[u8; 32]>,
pub preshared_key: Option<[u8; 32]>,
pub keep_alive: Option<u16>,
pub endpoint: SocketAddr,
pub allowed_ips: Vec<IpNet>,
}
Expand description
Representation of a WireGuard peer when setting the config
Fields§
§public_key: Option<[u8; 32]>
The peer’s public key
A preshared key used to symmetrically encrypt data with this peer
keep_alive: Option<u16>
How often to send a keep alive packet to prevent NATs from blocking UDP packets
Set to None if no keep alive behavior is wanted
endpoint: SocketAddr
The address this peer is reachable from using UDP across the internet
allowed_ips: Vec<IpNet>
The set of IpNet
’s that dictate what packets are allowed to be sent of received from
this peer
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SetPeer
impl RefUnwindSafe for SetPeer
impl Send for SetPeer
impl Sync for SetPeer
impl Unpin for SetPeer
impl UnwindSafe for SetPeer
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