move orchestration logic into ssh-tokio

This commit is contained in:
nora 2024-08-23 17:54:49 +02:00
parent 9532065b16
commit ea28daca0c
11 changed files with 477 additions and 209 deletions

View file

@ -7,6 +7,14 @@ pub use ssh_transport as transport;
pub use ssh_transport::{Result, SshStatus};
use tracing::debug;
pub struct ThreadRngRand;
impl transport::SshRng for ThreadRngRand {
fn fill_bytes(&mut self, dest: &mut [u8]) {
use rand::RngCore;
rand::thread_rng().fill_bytes(dest);
}
}
pub struct ServerConnection {
transport: ssh_transport::server::ServerConnection,
state: ServerConnectionState,