Skip to content

Commit

Permalink
update doc for --ping-interval option
Browse files Browse the repository at this point in the history
  • Loading branch information
tsl0922 committed Dec 13, 2020
1 parent 73639d3 commit c61cca0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions man/ttyd.1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -144,13 +152,17 @@ 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
You can even run a none shell command like vim, try: \fB\fCttyd vim\fR, the web browser will show you a vim editor.
.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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions man/ttyd.man.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit c61cca0

Please sign in to comment.