ttmd

command module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2025 License: GPL-2.0 Imports: 25 Imported by: 0

README

ttmd

A robust HTTP backend for handling TTM connections.

Tag Go Version Go Reference Go Report License
CI Lint CI Build CI Build-Debug

Documentation

Overview

ttmd - A robust HTTP backend for handling TTM connections

ttmd provides a lightweight HTTP server that manages websocket connections for the TTM (Tmux Terminal Manager) frontend. It features configurable CSRF authentication, connection lifetime handling with respective resource cleanup, as well as an optional internal-only mode to restrict access to localhost.

The server attaches to and manages Tmux sessions, providing websocket connectivity to requested terminal sessions with proper input/output handling, terminal resizing capabilities, as well as overall connection monitoring.

Please note that this program is only meant to be used in conjunction with the Tmux Terminal Manager (TTM) frontend on sufficiently secured Unraid data storage systems within sufficiently secured networking environments without warranties.

Usage:

ttmd [flags]

The flags are:

-internal
    Allow only connections from 127.0.0.1. When this flag is enabled,
    the server will only accept connections from the local machine,
    providing an additional layer of security.
    Default: false

-csrf
    Enable CSRF authentication mechanism. When enabled, all connections
    require a valid CSRF token for authentication.
    Default: true

-port string
    Port to run the server on. Must be a valid numeric port.
    Default: "49161"

The server handles connections at the following endpoints:

/
  Root endpoint for connections.

/session/{session}
  Endpoint for a specific session, without CSRF token.

/session/{session}/csrf/{csrf}
  Endpoint for a specific session, with provided CSRF token.

Parameters can be provided by request (GET) or as part of the endpoint path.

After validation, connections are upgraded to websockets and authenticated based on the configuration flags before establishing the terminal session.

Jump to

Keyboard shortcuts

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