Documentation
¶
Overview ¶
Package host implements `cotty host`: it spawns the user's shell in a PTY, keeps the local terminal attached as usual, and shares the session with guests — either by listening locally or by dialing out to a relay.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
// Addr is the listen address for guests, e.g. ":7373". Ignored when
// Relay is set.
Addr string
// Shell overrides $SHELL. Empty means $SHELL, falling back to /bin/sh.
Shell string
// AllowWrite lets guests send input to the PTY. Default is view-only.
AllowWrite bool
// Code overrides the generated session code (useful for tests).
Code string
// Relay is a relay server to host through (e.g. "relay.example.com:7374").
// When set, the host dials out instead of listening, so it works from
// behind NAT without port forwarding.
Relay string
// Plain disables end-to-end encryption for relayed sessions. Relayed
// sessions are encrypted by default so the relay only sees ciphertext.
Plain bool
// Record, when set, writes the session as an asciicast v2 file at
// this path (playable with `cotty replay` or asciinema).
Record string
// Audit, when set, writes a JSON-lines "who did what" trail at this
// path: applied keystrokes by participant, joins/leaves, permission
// changes, kicks.
Audit string
// Quorum, when set, holds keystrokes from the Supervise participants
// (agents) as proposals until Quorum of the Approvers vote for them:
// M-of-N multisig for an agent's commands.
Quorum int
Approvers []string
Supervise []string
}
Options configures a hosted session.