mirror of
https://github.com/rosenpass/rosenpass.git
synced 2026-01-04 00:57:19 -08:00
feat(API): AddPskBroker endpoint
This commit is contained in:
@@ -40,7 +40,7 @@ rand = {workspace = true}
|
||||
procspawn = {workspace = true}
|
||||
|
||||
[features]
|
||||
experiment_broker_api = ["rustix", "libc"]
|
||||
experiment_api = ["rustix", "libc"]
|
||||
experiment_memfd_secret = []
|
||||
|
||||
[[bin]]
|
||||
@@ -48,7 +48,7 @@ name = "rosenpass-wireguard-broker-privileged"
|
||||
path = "src/bin/priviledged.rs"
|
||||
test = false
|
||||
doc = false
|
||||
required-features = ["experiment_broker_api"]
|
||||
required-features = ["experiment_api"]
|
||||
cfg = { target_os = "linux" }
|
||||
|
||||
[[bin]]
|
||||
@@ -56,5 +56,5 @@ name = "rosenpass-wireguard-broker-socket-handler"
|
||||
test = false
|
||||
path = "src/bin/socket_handler.rs"
|
||||
doc = false
|
||||
required-features = ["experiment_broker_api"]
|
||||
required-features = ["experiment_api"]
|
||||
cfg = { target_os = "linux" }
|
||||
|
||||
@@ -20,8 +20,8 @@ pub struct Envelope<M: AsBytes + FromBytes> {
|
||||
#[repr(packed)]
|
||||
#[derive(AsBytes, FromBytes, FromZeroes)]
|
||||
pub struct SetPskRequest {
|
||||
pub peer_id: [u8; 32],
|
||||
pub psk: [u8; 32],
|
||||
pub peer_id: [u8; 32],
|
||||
pub iface_size: u8, // TODO: We should have variable length strings in lenses
|
||||
pub iface_buf: [u8; 255],
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#[cfg(feature = "experiment_broker_api")]
|
||||
#[cfg(feature = "experiment_api")]
|
||||
pub mod mio_client;
|
||||
#[cfg(all(feature = "experiment_broker_api", target_os = "linux"))]
|
||||
#[cfg(all(feature = "experiment_api", target_os = "linux"))]
|
||||
pub mod netlink;
|
||||
|
||||
pub mod native_unix;
|
||||
|
||||
@@ -34,7 +34,7 @@ pub trait WireguardBrokerMio: WireGuardBroker {
|
||||
fn unregister(&mut self, registry: &mio::Registry) -> Result<(), Self::MioError>;
|
||||
}
|
||||
|
||||
#[cfg(feature = "experiment_broker_api")]
|
||||
#[cfg(feature = "experiment_api")]
|
||||
pub mod api;
|
||||
|
||||
pub mod brokers;
|
||||
|
||||
Reference in New Issue
Block a user