ttyd README

The project's README from github.com/tsl0922/ttyd. As one markdown file: README.md.

backend frontend GitHub Releases Docker Pulls Packaging status GitHub

ttyd - Share your terminal over the web

ttyd is a simple command-line tool for sharing terminal over the web.

screenshot

Features

Installation

Install on macOS

Install on Linux

Install on Windows

Usage

Command-line Options

USAGE:
    ttyd [options] <command> [<arguments...>]

OPTIONS:
    -p, --port              Port to listen (default: 7681, use `0` for random port)
    -i, --interface         Network interface to bind (eg: eth0), or UNIX domain socket path (eg: /var/run/ttyd.sock)
    -U, --socket-owner      User owner of the UNIX domain socket file, when enabled (eg: user:group)
    -c, --credential        Credential for basic authentication (format: username:password)
    -H, --auth-header       HTTP Header name for auth proxy, this will configure ttyd to let a HTTP reverse proxy handle authentication
    -u, --uid               User id to run with
    -g, --gid               Group id to run with
    -s, --signal            Signal to send to the command when exit it (default: 1, SIGHUP)
    -w, --cwd               Working directory to be set for the child program
    -a, --url-arg           Allow client to send command line arguments in URL (eg: http://localhost:7681?arg=foo&arg=bar)
    -W, --writable          Allow clients to write to the TTY (readonly by default)
    -t, --client-option     Send option to client (format: key=value), repeat to add more options
    -T, --terminal-type     Terminal type to report, default: xterm-256color
    -O, --check-origin      Do not allow websocket connection from different origin
    -m, --max-clients       Maximum clients to support (default: 0, no limit)
    -o, --once              Accept only one client and exit on disconnection
    -q, --exit-no-conn      Exit on all clients disconnection
    -B, --browser           Open terminal with the default system browser
    -I, --index             Custom index.html path
    -b, --base-path         Expected base path for requests coming from a reverse proxy (eg: /mounted/here, max length: 128)
    -P, --ping-interval     Websocket ping interval(sec) (default: 5)
    -6, --ipv6              Enable IPv6 support
    -S, --ssl               Enable SSL
    -C, --ssl-cert          SSL certificate file path
    -K, --ssl-key           SSL key file path
    -A, --ssl-ca            SSL CA file path for client certificate verification
    -d, --debug             Set log level (default: 7)
    -v, --version           Print the version and exit
    -h, --help              Print this text and exit

Read the example usage on the wiki.

Browser Support

Modern browsers, See Browser Support.

Alternatives

ttyd (tsl0922/ttyd)

Searching Database…

12.5K ·GitHub
这是什么?ttyd 是一个命令行工具,可以通过网页分享你的终端,让你在浏览器里访问并操作终端会话。
这是图形界面应用还是命令行工具?它是命令行工具:你用想要的 shell 或程序运行 `ttyd` 命令,它就会启动一个网页服务器,把终端会话推送给连接的浏览器。
我该怎么安装和运行它?可以通过你所用系统的包管理器安装(macOS 上用 Homebrew 或 MacPorts,Linux 上用 apt 或 snap,Windows 上用 WinGet 或 Scoop,OpenWrt 上用 opkg),也可以从发布页下载预编译的静态二进制文件,然后用 ttyd 加上你想分享的命令来运行。
它底层需要什么才能工作?它基于 libuv 和 WebGL2 来渲染终端,SSL 支持则由 OpenSSL 或 Mbed TLS 提供。
在任何浏览器里都能用吗?需要较新的现代浏览器;项目里有一个专门的浏览器支持页面,列出了兼容的浏览器。
它只能在 Linux/macOS 上运行吗?不是,它是跨平台的:支持 macOS、Linux、FreeBSD/OpenBSD、OpenWrt 和 Windows。
能在终端里传输文件吗?可以,ttyd 直接在终端会话中支持 ZMODEM(lrzsz)和 trzsz 文件传输。
能在终端里显示图片吗?可以,它支持 Sixel 图像输出,所以 img2sixel 或 lsix 之类的工具可以在网页终端里显示图片。
支持中文、日文这类非 ASCII 输入吗?支持,它是功能完整的终端,内置 CJK 和输入法(IME)支持。
ttyd 有替代品吗?README 里提到了 Wetty(基于 Node,支持 SSH 和登录)和 GoTTY(基于 Go 的网页终端)作为替代品。
What are similar projects?websocketd, xterm.js, WindTerm, upterm, gotty, tailcat, xpra, smartdns
Creator
tsl0922
Size
20.1 MB
Stars
12.5K
Age
10y
Commits · 90 Days