Skip to main content

Module model

Module model 

Source
Expand description

Data model for VpsRecord (schema v3).

Passwords use SecretString for automatic zeroize via Drop. On-disk TOML is plaintext (mode 0o600) or encrypted (sshcli-enc:v1:) when a primary key exists. Debug is customized to NEVER expose sensitive values.

Schema v3: English wire keys on serialize (name, port, username, …). Deserialize accepts both EN and legacy Portuguese aliases (nome, porta, …). Schema v2: password or key auth, max_command/max_output duality, disable_sudo.

Structs§

VpsRecord
VPS host record in the configuration file.

Constants§

CURRENT_SCHEMA_VERSION
Current schema version of the config.toml file.
DEFAULT_MAX_COMMAND_CHARS
Default character limit for the command (one-shot maxChars).
DEFAULT_MAX_OUTPUT_CHARS
Default character limit for captured output.
DEFAULT_TIMEOUT_MS
Default timeout in milliseconds (60s).

Functions§

effective_limit
Converts a config limit into the effective value for truncation/validation.
parse_char_limit
Parses a limit string ("none", "0", or a number).