API Reference
StreamSec.Snip.Server
Secure Network Interface Framework - StreamSec.Snip.Server
Feature notes: Snif remoting framework (concepts)
Classes, interfaces and records
inherits from TsnifClassServer
constructor Create(AOwner: TComponent); override;
Constructs the whole server object graph in one shot: the owned SSH socket server, the three host-key components (RSA file-backed, ECDSA-P384 and Ed25519 in-memory), the Snip subsystem controller and the SSH-transport user list, all pre-wired with modern KEX/cipher/MAC defaults.
Full description »
procedure SuggestRequiredUnits(aProc: tGetStringMethod); override;
procedure Start;
Brings the server online: generates or loads the host key selected by HostKeyKind, selects the matching host-key signature algorithms, loads the Snif user list from Storage (with write-through), then activates the SSH socket server and the Snip subsystem. Call this once configuration is done; it is the server-side counterpart to a client's connect.
» member page
procedure Stop;
Takes the server offline by deactivating the SSH socket server and the Snip subsystem. Call to stop accepting connections (e.g. at shutdown or to reconfigure before another Start).
» member page
property SSHServer: TstSSHSocketServer read GetSSHServer;
The owned SSH socket server doing the actual transport work. Access it for advanced SSH tuning not surfaced as published properties (KEX/cipher/MAC option lists, connection events, timeouts). Read-only reference - do not free it; the TsnipServer owns its lifetime.
» member page
property SSHUsersComp: TstSSHServerUsers read GetSSHUsersComp;
The SSH-transport user list component (TstSSHServerUsers) that authenticates the SSH login itself. Use it to reach SSH-user features beyond the published SSHUsers/SSHUsersFilename shortcuts. Distinct from the Snif application-layer auth backed by Storage.
» member page
property RSAKey: TstRSAKey read GetRSAKey;
The RSA host-key component, presented when HostKeyKind = hkRSA. Unlike the EC/Ed keys it is file-backed (PrivateKeyFileName/PublicKeyFileName): at Start it loads the key from disk if present, else generates and saves a new one. Access it to inspect or further configure the RSA host key.
» member page
property ECDSAKey: TstECDSAKey read GetECDSAKey;
The ECDSA (NIST P-384) host-key component, presented when HostKeyKind = hkECDSA. Generated in memory at Start (not persisted), so a fresh key is used each run unless you configure persistence on it directly.
» member page
property EdDSAKey: TstEdDSAKey read GetEdDSAKey;
The EdDSA (Ed25519) host-key component, presented when HostKeyKind = hkEdDSA. Generated in memory at Start (not persisted), like the ECDSA key.
» member page
property MaxFrameSize: Integer read GetMaxFrameSize write SetMaxFrameSize default cSnipDefaultMaxFrameSize;
Maximum inbound frame BODY in octets (at least 1; default 16 MiB). TLS/QUIC also use it for the AddIn buffered-plaintext ceiling.
Full description »
property HostKeyKind: TsnipHostKeyKind read fHostKeyKind write fHostKeyKind default hkRSA;
Which host key is generated + presented at Start (default RSA).
» member page
property BindIP: string read GetBindIP write SetBindIP;
Local interface/address the server binds to. Leave blank to listen on all interfaces, or set a specific IP to restrict which NIC accepts connections. Delegates to the underlying SSHServer.BindIP.
» member page
property BindPort: Integer read GetBindPort write SetBindPort default 22;
TCP port the server listens on (default 22, the standard SSH port). Set to a non-privileged port when running without admin rights or to avoid a system sshd. Delegates to SSHServer.BindPort.
» member page
property PublicKeyFileName: TFileName read GetPublicKeyFileName write SetPublicKeyFileName;
Path where the RSA host key's SSH public key is written. Only relevant when HostKeyKind = hkRSA (the RSA key is the sole file-backed host key); the EC/Ed host keys are in-memory. Delegates to RSAKey.PublicKeyFileName.
» member page
property PrivateKeyFileName: TFileName read GetPrivateKeyFileName write SetPrivateKeyFileName;
Path of the RSA host key's encrypted private key file. At Start it is loaded if present, otherwise a new key is generated and saved here. Only relevant for HostKeyKind = hkRSA. Delegates to RSAKey.PrivateKeyFileName.
» member page
property PrivateKeyPassword: AnsiString read GetPrivateKeyPassword write SetPrivateKeyPassword;
Password protecting the RSA private-key file above (PKCS8-Encrypted-RSA). Set it to match your key file before Start. Only relevant for HostKeyKind = hkRSA. Delegates to RSAKey.PrivateKeyPassword.
» member page
property SSHUsers: tUserCollection read GetUsers write SetUsers;
The SSH-transport user collection (name/credential entries) that clients authenticate against at the SSH layer. Populate it in code/at design time, or load it from SSHUsersFilename. Delegates to the owned SSHUsersComp.Users; this is the SSH login list, separate from the Snif application auth in Storage.
» member page
property SSHUsersFilename: TFilename read GetSSHUsersFilename write SetSSHUsersFilename;
File the SSH user list (SSHUsers) is persisted to/loaded from. Set it to keep SSH credentials on disk instead of hard-coding them. Delegates to SSHUsersComp.Filename.
» member page
property Storage: TsnifCustomUserStorage read fStorage write SetStorage;
Persistence for the Snif (class-remoting) user list - e.g. a TsnifUserFileStorage. At Start the user list is loaded from it and a write-through hook is wired so server-side credential changes (AkeChangeAuth / ChangePassword) are persisted. This is the SNIF auth layer, distinct from the SSH-transport SSHUsers above.
» member page
Types (enumerations, sets, aliases)
enumTsnipHostKeyKind
Which host-key type the server presents (selected before Start).
TsnipHostKeyKind = (hkRSA, hkECDSA, hkEdDSA);