45ae7099d2
Changes: - Remove pg_conn field from SshServerConfig struct - Remove pg_conn parameter from run_ssh_server function - Remove pg_conn CLI argument from ssh-start command - Remove non-existent user management API routes - Add missing dependencies: sysinfo, dirs - Fix CLI web.rs to pass home directory to server::run - Fix SSH server stream type (tokio -> std TcpStream) All compilation errors resolved.
25 lines
700 B
Rust
25 lines
700 B
Rust
use clap::Subcommand;
|
|
|
|
#[derive(Subcommand)]
|
|
pub enum SshCommand {
|
|
#[command(name = "ssh-start")]
|
|
Start {
|
|
#[arg(short, long, default_value = "2024")]
|
|
port: u16,
|
|
},
|
|
}
|
|
|
|
pub async fn handle_ssh_command(cmd: SshCommand) -> anyhow::Result<()> {
|
|
match cmd {
|
|
SshCommand::Start { port } => {
|
|
println!("🚀 Starting SSH server (MarkBaseSSH 1.0)");
|
|
println!(" Port: {}", port);
|
|
println!(" Auth Provider: SQLite");
|
|
println!(" Security: ⭐⭐⭐⭐⭐ (RustCrypto authoritative libraries)");
|
|
println!();
|
|
|
|
crate::ssh_server::server::run_ssh_server(Some(port)).await?;
|
|
}
|
|
}
|
|
Ok(())
|
|
} |