mirror of
https://github.com/rosenpass/rosenpass.git
synced 2025-12-18 21:34:37 +03:00
Compare commits
14 Commits
arabich/an
...
macos-runn
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60a411e363 | ||
|
|
caf8801004 | ||
|
|
858c0904ad | ||
|
|
e9838722b0 | ||
|
|
69043fbae7 | ||
|
|
a70b71d509 | ||
|
|
96bed38ad0 | ||
|
|
a75d7a53e0 | ||
|
|
c4314c0eff | ||
|
|
511a59fe1b | ||
|
|
5e4a7c3b7f | ||
|
|
139e62d1fb | ||
|
|
c417fafe2a | ||
|
|
8f4141a159 |
7
.github/workflows/qc.yaml
vendored
7
.github/workflows/qc.yaml
vendored
@@ -110,7 +110,12 @@ jobs:
|
|||||||
- run: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --document-private-items
|
- run: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --document-private-items
|
||||||
|
|
||||||
cargo-test:
|
cargo-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-13]
|
||||||
|
# - ubuntu is x86-64
|
||||||
|
# - macos-13 is also x86-64 architecture
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v3
|
||||||
|
|||||||
14
Cargo.lock
generated
14
Cargo.lock
generated
@@ -1066,6 +1066,12 @@ version = "0.3.9"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
|
checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "hex"
|
||||||
|
version = "0.4.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "home"
|
name = "home"
|
||||||
version = "0.5.9"
|
version = "0.5.9"
|
||||||
@@ -2325,6 +2331,12 @@ dependencies = [
|
|||||||
"unicode-ident",
|
"unicode-ident",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "take-until"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b4e17d8598067a8c134af59cd33c1c263470e089924a11ab61cf61690919fe3b"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tempfile"
|
name = "tempfile"
|
||||||
version = "3.10.1"
|
version = "3.10.1"
|
||||||
@@ -2857,8 +2869,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "89ba4e9811befc20af3b6efb15924a7238ee5e8e8706a196576462a00b9f1af1"
|
checksum = "89ba4e9811befc20af3b6efb15924a7238ee5e8e8706a196576462a00b9f1af1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"derive_builder 0.10.2",
|
"derive_builder 0.10.2",
|
||||||
|
"hex",
|
||||||
"libc",
|
"libc",
|
||||||
"neli",
|
"neli",
|
||||||
|
"take-until",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -77,6 +77,6 @@ procspawn = {version = "1.0.0", features= ["test-support"]}
|
|||||||
|
|
||||||
|
|
||||||
#Broker dependencies (might need cleanup or changes)
|
#Broker dependencies (might need cleanup or changes)
|
||||||
wireguard-uapi = "3.0.0"
|
wireguard-uapi = { version = "3.0.0", features = ["xplatform"] }
|
||||||
command-fds = "0.2.3"
|
command-fds = "0.2.3"
|
||||||
rustix = { version = "0.38.27", features = ["net"] }
|
rustix = { version = "0.38.27", features = ["net"] }
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ path = "src/bin/priviledged.rs"
|
|||||||
test = false
|
test = false
|
||||||
doc = false
|
doc = false
|
||||||
required-features=["enable_broker_api"]
|
required-features=["enable_broker_api"]
|
||||||
|
cfg = { target_os = "linux" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "rosenpass-wireguard-broker-socket-handler"
|
name = "rosenpass-wireguard-broker-socket-handler"
|
||||||
@@ -51,3 +52,4 @@ test = false
|
|||||||
path = "src/bin/socket_handler.rs"
|
path = "src/bin/socket_handler.rs"
|
||||||
doc = false
|
doc = false
|
||||||
required-features=["enable_broker_api"]
|
required-features=["enable_broker_api"]
|
||||||
|
cfg = { target_os = "linux" }
|
||||||
|
|||||||
@@ -1,3 +1,13 @@
|
|||||||
|
fn main() {
|
||||||
|
#[cfg(target_os = "linux")]
|
||||||
|
linux::main().unwrap();
|
||||||
|
|
||||||
|
#[cfg(not(target_os = "linux"))]
|
||||||
|
panic!("This binary is only supported on Linux");
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(target_os = "linux")]
|
||||||
|
pub mod linux {
|
||||||
use std::io::{stdin, stdout, Read, Write};
|
use std::io::{stdin, stdout, Read, Write};
|
||||||
use std::result::Result;
|
use std::result::Result;
|
||||||
|
|
||||||
@@ -17,7 +27,7 @@ pub enum BrokerAppError {
|
|||||||
OversizedMessage(u64),
|
OversizedMessage(u64),
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() -> Result<(), BrokerAppError> {
|
pub fn main() -> Result<(), BrokerAppError> {
|
||||||
let mut broker = BrokerServer::new(wg::NetlinkWireGuardBroker::new()?);
|
let mut broker = BrokerServer::new(wg::NetlinkWireGuardBroker::new()?);
|
||||||
|
|
||||||
let mut stdin = stdin().lock();
|
let mut stdin = stdin().lock();
|
||||||
@@ -54,3 +64,4 @@ fn main() -> Result<(), BrokerAppError> {
|
|||||||
stdout.flush()?;
|
stdout.flush()?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#[cfg(feature = "enable_broker_api")]
|
#[cfg(feature = "enable_broker_api")]
|
||||||
pub mod mio_client;
|
pub mod mio_client;
|
||||||
#[cfg(feature = "enable_broker_api")]
|
#[cfg(all(feature = "enable_broker_api", target_os = "linux"))]
|
||||||
pub mod netlink;
|
pub mod netlink;
|
||||||
|
|
||||||
pub mod native_unix;
|
pub mod native_unix;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#![cfg(target_os = "linux")]
|
||||||
|
|
||||||
use std::fmt::Debug;
|
use std::fmt::Debug;
|
||||||
|
|
||||||
use wireguard_uapi::linux as wg;
|
use wireguard_uapi::linux as wg;
|
||||||
|
|||||||
Reference in New Issue
Block a user