Полная реализация production-фиксов из up3: anti-torrent rebuild, peer-status, drift rate/ceil, reboot window

This commit is contained in:
2026-05-10 00:15:17 +05:00
parent d9f140b3e0
commit 535c1dbc33
8 changed files with 358 additions and 32 deletions
+23
View File
@@ -67,6 +67,29 @@ pub fn print_status(cfg: &Config) -> anyhow::Result<()> {
println!(" ingress_present: {}", ingress_qdisc.contains("ingress"));
println!(" ifb_htb_present: {}", ifb_qdisc.contains("htb"));
println!(" peer_table:");
match traffic::peer_status_table(cfg) {
Ok(Some(rows)) if rows.is_empty() => println!(" no peers discovered"),
Ok(Some(rows)) => {
for r in rows {
println!(
" ip={} class_id={} egress_filter={} ingress_filter={} egress={}/{} ingress={}/{} drift={}",
r.ip,
r.class_id,
r.egress_filter_present,
r.ingress_filter_present,
r.egress_rate.unwrap_or_else(|| "n/a".to_string()),
r.egress_ceil.unwrap_or_else(|| "n/a".to_string()),
r.ingress_rate.unwrap_or_else(|| "n/a".to_string()),
r.ingress_ceil.unwrap_or_else(|| "n/a".to_string()),
r.drift_reason.unwrap_or_else(|| "no".to_string())
);
}
}
Ok(None) => println!(" traffic disabled"),
Err(e) => println!(" unavailable ({e})"),
}
println!("Anti-torrent:");
println!(" enabled: {}", cfg.anti_torrent.enabled);
println!(