mirror of
https://codeberg.org/icewind/netnsd.git
synced 2026-06-03 09:04:07 +02:00
move proxies to sub-processes
This commit is contained in:
parent
b595282810
commit
e672e11f09
9 changed files with 217 additions and 199 deletions
|
|
@ -4,7 +4,6 @@ use crate::proxy::{ActiveProxy, ProxyError};
|
|||
use futures::FutureExt;
|
||||
use futures::StreamExt;
|
||||
use futures_concurrency::stream::Merge;
|
||||
use humansize::{BINARY, SizeFormatter};
|
||||
use main_error::MainResult;
|
||||
use sd_notify::{NotifyState, notify};
|
||||
use std::io::Error as IoError;
|
||||
|
|
@ -78,13 +77,9 @@ async fn daemon_async(mut config: Config) -> Result<(), DaemonError> {
|
|||
println!("{}:", namespace.name());
|
||||
for proxy in &namespace.proxies {
|
||||
println!(
|
||||
" {} => {} {} connections ({} active), {} sent to namespace, {} received from namespace",
|
||||
" {} => {}",
|
||||
proxy.source,
|
||||
proxy.destination,
|
||||
proxy.stats.total_connections(),
|
||||
proxy.stats.open_connections(),
|
||||
SizeFormatter::new(proxy.stats.written(), BINARY),
|
||||
SizeFormatter::new(proxy.stats.read(), BINARY),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue