release: NX9-WG v1.0.0
This commit is contained in:
1 parent
c8a9b7cde6
commit
4dfe42fe68
42 files changed
+4689
-336
No files matched your search
@@ -0,0 +1,27 @@
|
||||
#[cfg(target_os = "linux")]
|
||||
#[tokio::test]
|
||||
async fn test_native_linux_live_discovery() {
|
||||
use nx9_wireguard::NativeLinuxWireGuardEngine;
|
||||
use nx9_wireguard::WireGuardEngine;
|
||||
|
||||
let engine = NativeLinuxWireGuardEngine::new();
|
||||
let ifaces = engine.list_interfaces().await.unwrap();
|
||||
println!("Discovered WireGuard interfaces: {:?}", ifaces);
|
||||
|
||||
// Ensure list_interfaces returns a valid list
|
||||
for iface in &ifaces {
|
||||
match engine.get_interface_stats(iface).await {
|
||||
Ok(Some(stats)) => {
|
||||
println!(
|
||||
"Interface {iface} live stats: public_key={:?}, port={}, peers={}, up={}",
|
||||
stats.public_key,
|
||||
stats.listen_port,
|
||||
stats.peers.len(),
|
||||
stats.is_up
|
||||
);
|
||||
}
|
||||
Ok(None) => println!("Interface {iface} returned None"),
|
||||
Err(e) => println!("Interface {iface} query returned error: {e}"),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -101,6 +101,9 @@ async fn test_wireguard_engine_lifecycle_and_telemetry() {
|
||||
.expect("interface exists");
|
||||
assert_eq!(stats.name, "wg0");
|
||||
assert_eq!(stats.public_key, srv_pub.as_str());
|
||||
assert_eq!(stats.addresses, vec!["10.0.0.1/24".to_string()]);
|
||||
assert_eq!(stats.mtu, Some(1420));
|
||||
assert!(stats.is_up);
|
||||
assert_eq!(
|
||||
stats.peers.len(),
|
||||
1,
|
||||
|
||||
Reference in new issue
Block a user