From c61cca08c9b4b6623abff373f206da8d8ba39c7d Mon Sep 17 00:00:00 2001 From: Shuanglei Tao Date: Sun, 13 Dec 2020 23:08:33 +0800 Subject: [PATCH] update doc for --ping-interval option --- README.md | 1 + man/ttyd.1 | 16 ++++++++++++++++ man/ttyd.man.md | 3 +++ 3 files changed, 20 insertions(+) diff --git a/README.md b/README.md index e787bba..b74e30f 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,7 @@ OPTIONS: -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) + -P, --ping-interval Websocket ping interval(sec) (default: 300) -6, --ipv6 Enable IPv6 support -S, --ssl Enable SSL -C, --ssl-cert SSL certificate file path diff --git a/man/ttyd.1 b/man/ttyd.1 index cc49f3a..83e8f63 100644 --- a/man/ttyd.1 +++ b/man/ttyd.1 @@ -13,6 +13,8 @@ ttyd \- Share your terminal over the web .SH Description .PP ttyd is a command\-line tool for sharing terminal over the web that runs in *nix and windows systems, with the following features: + +.RS .IP \(bu 2 Built on top of Libwebsockets with libuv for speed .IP \(bu 2 @@ -28,6 +30,8 @@ Basic authentication support and many other custom options .IP \(bu 2 Cross platform: macOS, Linux, FreeBSD/OpenBSD, OpenWrt/LEDE, Windows +.RE + .SH OPTIONS .PP @@ -95,6 +99,10 @@ Cross platform: macOS, Linux, FreeBSD/OpenBSD, OpenWrt/LEDE, Windows \-b, \-\-base\-path Expected base path for requests coming from a reverse proxy (eg: /mounted/here) +.PP +\-P, \-\-ping\-interval + Websocket ping interval(sec) (default: 300) + .PP \-6, \-\-ipv6 Enable IPv6 support @@ -144,6 +152,8 @@ ttyd \-p 8080 bash \-x .PP Then open \[la]http://localhost:8080\[ra] with a browser, you will get a bash shell with debug mode enabled. More examples: + +.RS .IP \(bu 2 If you want to login with your system accounts on the web browser, run \fB\fCttyd login\fR\&. .IP \(bu 2 @@ -151,6 +161,8 @@ You can even run a none shell command like vim, try: \fB\fCttyd vim\fR, the web .IP \(bu 2 Sharing single process with multiple clients: \fB\fCttyd tmux new \-A \-s ttyd vim\fR, run \fB\fCtmux new \-A \-s ttyd\fR to connect to the tmux session from terminal. +.RE + .SH SSL how\-to .PP @@ -208,11 +220,15 @@ If you don't want to enable client certificate verification, remove the \fB\fC\- .SH Docker and ttyd .PP Docker containers are jailed environments which are more secure, this is useful for protecting the host system, you may use ttyd with docker like this: + +.RS .IP \(bu 2 Sharing single docker container with multiple clients: docker run \-it \-\-rm \-p 7681:7681 tsl0922/ttyd. .IP \(bu 2 Creating new docker container for each client: ttyd docker run \-it \-\-rm ubuntu. +.RE + .SH Nginx reverse proxy .PP diff --git a/man/ttyd.man.md b/man/ttyd.man.md index e963d43..5da4c95 100644 --- a/man/ttyd.man.md +++ b/man/ttyd.man.md @@ -67,6 +67,9 @@ ttyd 1 "September 2016" ttyd "User Manual" -b, --base-path Expected base path for requests coming from a reverse proxy (eg: /mounted/here) + -P, --ping-interval + Websocket ping interval(sec) (default: 300) + -6, --ipv6 Enable IPv6 support -- 2.43.4