mirror of
https://github.com/Noratrieb/cluelessh.git
synced 2026-01-15 08:55:06 +01:00
move orchestration logic into ssh-tokio
This commit is contained in:
parent
9532065b16
commit
ea28daca0c
11 changed files with 477 additions and 209 deletions
|
|
@ -4,6 +4,7 @@ version = "0.1.0"
|
|||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
rand = "0.8.5"
|
||||
ssh-connection = { path = "../ssh-connection" }
|
||||
ssh-transport = { path = "../ssh-transport" }
|
||||
tracing.workspace = true
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue