added interface function [CI SKIP]
This commit is contained in:
parent
0f50dc3e00
commit
a8be702e88
@ -74,6 +74,13 @@ impl Base64Backed for SharedKey {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Builder, PartialEq, Eq, Hash, Clone)]
|
||||
pub struct Interface {
|
||||
key: ECCKey,
|
||||
port: usize,
|
||||
fwmark: Option<String>
|
||||
}
|
||||
|
||||
#[derive(Debug, Builder, PartialEq, Eq, Hash, Clone)]
|
||||
pub struct Peer {
|
||||
key: ECCKey,
|
||||
@ -126,5 +133,7 @@ impl PeerBuilder {
|
||||
pub trait WireguardController {
|
||||
fn peers<'a>(&'a mut self) -> io::Result<Box<Iterator<Item = io::Result<Peer>> + 'a>>;
|
||||
|
||||
fn interface(&mut self) -> io::Result<Interface>;
|
||||
|
||||
fn update_peer(&mut self, peer: &Peer) -> io::Result<()>;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user