host

package
v0.0.0-...-f21ad71 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 28 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func Run

func Run(opts Options) error

Run hosts a session and blocks until the shell exits.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL