Skip to main content

Crate libmoshpit

Crate libmoshpit 

Source
Expand description

libmoshpit - moshpit library

Structs§

ConnectionReader
A reader over a ReadHalf and BytesMut buffer.
ConnectionWriter
A writer over a WriteHalf and BytesMut buffer.
Emulator
A VT100/VT220 terminal emulator that tracks screen state.
EncryptedKeyPair
A moshpit encrypted key pair. A password is required to decrypt the private key.
FileLayer
Tracing configuration
Kex
The moshpit key exchange result
KexReader
The key exchange reader for the moshpit
KexSender
The key exchange sender for the moshpit
KexStateMachine
The moshpit key exchange state machine
KeyPair
A moshpit key pair consisting of a private and public key.
Layer
Tracing configuration
Mps
Used in bartoc configuration to define the bartos instance to connect to
OverlayCell
A cell to be painted on top of the real screen when rendering.
OverlayCursor
Predicted cursor position to be applied after rendering overlay cells.
PredictionEngine
Local-echo prediction engine.
Renderer
A stateful differential renderer.
ServerKex
Extended key exchange for the moshpits side of the exchange
Tracing
Tracing configuration
UdpClient
UDP client data
UdpReader
UDP reader for encrypted frames
UdpSender
UDP sender for encrypted frames
UnencryptedKeyPair
A moshpit unencrypted key pair consisting of a private and public key.
UuidWrapper
A Uuid wrapper that implements bincode::Encode and bincode::Decode

Enums§

AEADCipher
The AEAD cipher algorithms supported by moshpit key generation.
DisplayPreference
How aggressively to display local-echo predictions.
EncryptedFrame
A moshpit frame.
Frame
A moshpit frame.
KexEvent
The key exchange events
KexMode
The key exchange mode
KexState
The moshpit key exchange state
MoshpitError
Errors that can occur in moshpit
TerminalMessage
A message for the moshpits psuedo-terminal

Constants§

MAX_UDP_PAYLOAD
Maximum payload size for UDP frames to avoid IP fragmentation. Accounts for ~140 bytes of wire overhead (nonce, seq, HMAC, length, UUID, AEAD tag, bincode) subtracted from a conservative 1400-byte UDP payload target (below 1500-byte Ethernet MTU minus IP/UDP headers).

Traits§

KexConfig
Trait for key exchange configuration
PathDefaults
Trait to allow default paths to be supplied to load
TracingConfigExt
Extension trait for TracingConfig to add additional configuration options

Functions§

clap_or_error
Converts an anyhow::Error into a suitable exit code or clap message for a CLI application.
decrypt_private_key
Decrypts the provided encrypted private key bytes in place using the
extract_public_key_bytes
Extract the public key bytes from a moshpit public key reader
fingerprint
Generate the fingerprint for the given key bytes
init_tracing
Initialize tracing
is_exit_title
Check if a terminal title indicates an exit command
load
Load the configuration
load_private_key
Load a moshpit key pair from the provided private key path.
load_public_key
Load a moshpit public key from the provided public key path.
new_session_registry
Create a new, empty SessionRegistry.
paint_overlays_to_ansi
Emit the ANSI sequences for overlays and cursor without touching any renderer state. Used by the stdin forwarder to preview predicted keystrokes on top of whatever is currently displayed — without modifying the differential-render baseline.
parse_server_destination
Parse the server destination command line option into a SocketAddr
randomart
Get the randomart image for the given key bytes
run_key_exchange
Run the client side of the key exchange
success
Indicates successful execution of a function, returning exit code 0.
to_path_buf
Convert a string to a PathBuf
verify_fingerprint
Verify a public key fingerprint against the provided key bytes

Type Aliases§

SessionRegistry
Minimal session registry used during key exchange.