Fix compilation errors after PostgreSQL removal
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.
This commit is contained in:
@@ -6,30 +6,20 @@ pub enum SshCommand {
|
||||
Start {
|
||||
#[arg(short, long, default_value = "2024")]
|
||||
port: u16,
|
||||
|
||||
/// PostgreSQL connection string for SFTPGo-compatible auth (e.g. "host=127.0.0.1 port=5432 dbname=sftpgo user=sftpgo password=sftpgo_pass_2026")
|
||||
#[arg(long)]
|
||||
pg_conn: Option<String>,
|
||||
},
|
||||
}
|
||||
|
||||
pub async fn handle_ssh_command(cmd: SshCommand) -> anyhow::Result<()> {
|
||||
match cmd {
|
||||
SshCommand::Start { port, pg_conn } => {
|
||||
println!("=== MarkBase SSH Server (Hand-written Implementation) ===");
|
||||
println!("Port: {}", port);
|
||||
println!("Implementation: SSH-2.0-MarkBaseSSH_1.0");
|
||||
println!("Features: SSH + SFTP + SCP + rsync");
|
||||
if pg_conn.is_some() {
|
||||
println!("Auth Provider: PostgreSQL (SFTPGo-compatible)");
|
||||
} else {
|
||||
println!("Auth Provider: SQLite");
|
||||
}
|
||||
println!("Security: ⭐⭐⭐⭐⭐ (RustCrypto authoritative libraries)");
|
||||
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), pg_conn.as_deref()).await?;
|
||||
crate::ssh_server::server::run_ssh_server(Some(port)).await?;
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user