what is this

This commit is contained in:
lda
2025-11-17 00:41:33 +07:00 Unverified
parent 6405bb5bf7
commit 3c35255ddd
3 changed files with 27 additions and 8 deletions
+14 -3
View File
@@ -21,8 +21,19 @@
use super::AddrInfo;
pub async fn get(dev: Option<&str>) -> anyhow::Result<Vec<AddrInfo>> {
let mut cmd = tokio::process::Command::new("ip");
cmd.args(["-j", "address", "show"]);
if let Some(d) = dev {
cmd.args(["dev", d]);
}
pub async fn get() -> Vec<AddrInfo> {
todo!()
}
let output = cmd.output().await?;
if !output.status.success() {
anyhow::bail!(String::from_utf8_lossy(&output.stderr).into_owned());
}
Ok(serde_json::from_slice(&output.stdout)?)
}
+5
View File
@@ -118,3 +118,8 @@ async fn ball_compare_backends() -> anyhow::Result<()> {
Ok(())
}
#[tokio::test]
async fn cidr_filter() {
unimplemented!("never. i aint add what i dont need")
}