Expand description
ssh-commander-core: Rust domain layer for R-Shell.
This crate owns all connection and protocol logic: SSH, PTY lifecycle, host-key handling, connection manager, SFTP, FTP, desktop protocol (RDP/VNC), and Keychain integration.
§Thread Safety
ConnectionManager:Send + Sync. All public methods areasync. Callers must be running inside a Tokio runtime. Internally usesArc<RwLock<HashMap>>— fine to call from any task, but the task must live on the Tokio runtime.SshClient:Send(notSync). Single-owner state; wrap inArc<RwLock<SshClient>>to share across tasks (asConnectionManagerdoes).StandaloneSftpClient,FtpClient: Same pattern asSshClient.HostKeyStore:Send + Sync. Usestokio::sync::Mutexinternally. Safe to share viaArc.keychainmodule: Synchronous only. Do not call from a Tokiospawn_blockingis fine; do not hold an.awaitacross a keychain call.PtySession:Send. Theoutput_rxfield isArc<Mutex<Receiver>>for sharing.input_txandresize_txare cloneableSenders.DesktopProtocoltrait: RequiresSend + Sync. Implementations (RdpClient,VncClient) areSend(notSync) — wrap inArc<RwLock<Box<dyn DesktopProtocol>>>.
Re-exports§
pub use connection_manager::ConnectionManager;pub use connection_manager::ManagedConnection;pub use connection_manager::ProtocolKind;pub use desktop_protocol::DesktopConnectRequest;pub use desktop_protocol::DesktopConnectResponse;pub use desktop_protocol::DesktopKind;pub use desktop_protocol::DesktopProtocol;pub use desktop_protocol::FrameUpdate;pub use desktop_protocol::RdpConfig;pub use desktop_protocol::VncConfig;pub use event_bus::CoreEvent;pub use keychain::CredentialKind;pub use keychain::delete_password;pub use keychain::is_supported;pub use keychain::list_accounts;pub use keychain::load_password;pub use keychain::save_password;pub use postgres::ActiveCursor;pub use postgres::BROWSER_SESSION_ID;pub use postgres::ColumnDetail;pub use postgres::ColumnMeta;pub use postgres::DbSummary;pub use postgres::ExecutionOutcome;pub use postgres::InsertColumnInput;pub use postgres::InsertedRow;pub use postgres::ObjectType;pub use postgres::ObjectTypeKind;pub use postgres::PageResult;pub use postgres::PgAuthMethod;pub use postgres::PgConfig;pub use postgres::PgError;pub use postgres::PgPool;pub use postgres::PgTlsMode;pub use postgres::Relation;pub use postgres::RelationKind;pub use postgres::Routine;pub use postgres::RoutineKind;pub use postgres::SchemaContents;pub use postgres::SchemaSummary;pub use postgres::Sequence;pub use postgres::SshTunnelRef;pub use postgres::UpdateOutcome;pub use sftp_client::FileEntry;pub use sftp_client::FileEntryType;pub use sftp_client::RemoteFileEntry;pub use sftp_client::SftpAuthMethod;pub use sftp_client::SftpConfig;pub use sftp_client::StandaloneSftpClient;pub use ssh::AuthMethod;pub use ssh::CommandOutput;pub use ssh::HostKeyMismatch;pub use ssh::HostKeyStore;pub use ssh::HostKeyStoreAccessError;pub use ssh::HostKeyVerificationFailure;pub use ssh::PtySession;pub use ssh::SshClient;pub use ssh::SshConfig;pub use tools::DnsAnswer;pub use tools::DnsQuery;pub use tools::GitStatus;pub use tools::ListeningPort;pub use tools::TcpdumpEvent;pub use tools::TcpdumpRegistry;pub use tools::ToolsError;pub use tools::dns_resolve_local;pub use tools::dns_resolve_remote;pub use tools::git_status;pub use tools::listening_ports;
Modules§
- connection_
manager - desktop_
protocol - event_
bus - Event bus — a single channel for all async-to-sync boundary crossings.
- ftp_
client - keychain
- macOS Keychain integration for SSH / SFTP / FTP credentials.
- postgres
- PostgreSQL pool for the database explorer.
- rdp_
client - sftp_
client - ssh
- tools
- Network/dev tools surface — features that ride on top of an existing SSH connection without requiring a separate protocol implementation.
- vnc_
client