Skip to content

Commit c15cfb7

Browse files
committed
Bump to 1.6.0
1 parent ef38d28 commit c15cfb7

File tree

4 files changed

+45
-7
lines changed

4 files changed

+45
-7
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 2.8)
22

33
project(ttyd)
4-
set(PROJECT_VERSION "1.5.2")
4+
set(PROJECT_VERSION "1.6.0")
55

66
find_package(Git)
77
if(GIT_FOUND)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ USAGE:
7171
ttyd [options] <command> [<arguments...>]
7272
7373
VERSION:
74-
1.5.2
74+
1.6.0
7575
7676
OPTIONS:
7777
-p, --port Port to listen (default: 7681, use `0` for random port)

man/ttyd.1

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ttyd \- Share your terminal over the web
1414
.PP
1515
ttyd is a command\-line tool for sharing terminal over the web that runs in *nix and windows systems, with the following features:
1616
.IP \(bu 2
17-
Built on top of Libwebsockets with C for speed
17+
Built on top of Libwebsockets with libuv for speed
1818
.IP \(bu 2
1919
Fully\-featured terminal based on Xterm.js with CJK (Chinese, Japanese, Korean) and IME support
2020
.IP \(bu 2
@@ -162,7 +162,7 @@ openssl req \-new \-x509 \-days 365 \-key ca.key \-subj "/C=CN/ST=GD/L=SZ/O=Acme
162162

163163
# server certificate (for multiple domains, change subjectAltName to: DNS:example.com,DNS:www.example.com)
164164
openssl req \-newkey rsa:2048 \-nodes \-keyout server.key \-subj "/C=CN/ST=GD/L=SZ/O=Acme, Inc./CN=localhost" \-out server.csr
165-
openssl x509 \-req \-extfile <(printf "subjectAltName=DNS:localhost") \-days 365 \-in server.csr \-CA ca.crt \-CAkey ca.key \-CAcreateserial \-out server.crt
165+
openssl x509 \-sha256 \-req \-extfile <(printf "subjectAltName=DNS:localhost") \-days 365 \-in server.csr \-CA ca.crt \-CAkey ca.key \-CAcreateserial \-out server.crt
166166

167167
# client certificate (the p12/pem format may be useful for some clients)
168168
openssl req \-newkey rsa:2048 \-nodes \-keyout client.key \-subj "/C=CN/ST=GD/L=SZ/O=Acme, Inc./CN=client" \-out client.csr
@@ -210,6 +210,28 @@ Sharing single docker container with multiple clients: docker run \-it \-\-rm \-
210210
Creating new docker container for each client: ttyd docker run \-it \-\-rm ubuntu.
211211

212212

213+
.SH Nginx reverse proxy
214+
.PP
215+
Sample config to proxy ttyd under the \fB\fC/ttyd\fR path:
216+
217+
.PP
218+
.RS
219+
220+
.nf
221+
location \~ ^/ttyd(.*)$ {
222+
proxy\_http\_version 1.1;
223+
proxy\_set\_header Host $host;
224+
proxy\_set\_header X\-Forwarded\-Proto $scheme;
225+
proxy\_set\_header X\-Forwarded\-For $proxy\_add\_x\_forwarded\_for;
226+
proxy\_set\_header Upgrade $http\_upgrade;
227+
proxy\_set\_header Connection "upgrade";
228+
proxy\_pass http://127.0.0.1:7681/$1;
229+
}
230+
231+
.fi
232+
.RE
233+
234+
213235
.SH AUTHOR
214236
.PP
215237
Shuanglei Tao <[email protected]> Visit

man/ttyd.man.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ttyd 1 "September 2016" ttyd "User Manual"
1010
# Description
1111
ttyd is a command-line tool for sharing terminal over the web that runs in *nix and windows systems, with the following features:
1212

13-
- Built on top of Libwebsockets with C for speed
13+
- Built on top of Libwebsockets with libuv for speed
1414
- Fully-featured terminal based on Xterm.js with CJK (Chinese, Japanese, Korean) and IME support
1515
- Graphical ZMODEM integration with lrzsz support
1616
- SSL support based on OpenSSL
@@ -111,7 +111,7 @@ openssl req -new -x509 -days 365 -key ca.key -subj "/C=CN/ST=GD/L=SZ/O=Acme, Inc
111111
112112
# server certificate (for multiple domains, change subjectAltName to: DNS:example.com,DNS:www.example.com)
113113
openssl req -newkey rsa:2048 -nodes -keyout server.key -subj "/C=CN/ST=GD/L=SZ/O=Acme, Inc./CN=localhost" -out server.csr
114-
openssl x509 -req -extfile <(printf "subjectAltName=DNS:localhost") -days 365 -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt
114+
openssl x509 -sha256 -req -extfile <(printf "subjectAltName=DNS:localhost") -days 365 -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt
115115
116116
# client certificate (the p12/pem format may be useful for some clients)
117117
openssl req -newkey rsa:2048 -nodes -keyout client.key -subj "/C=CN/ST=GD/L=SZ/O=Acme, Inc./CN=client" -out client.csr
@@ -140,5 +140,21 @@ curl --insecure --cert client.p12[:password] -v https://localhost:7681
140140
- Sharing single docker container with multiple clients: docker run -it --rm -p 7681:7681 tsl0922/ttyd.
141141
- Creating new docker container for each client: ttyd docker run -it --rm ubuntu.
142142

143+
# Nginx reverse proxy
144+
145+
Sample config to proxy ttyd under the `/ttyd` path:
146+
147+
```nginx
148+
location ~ ^/ttyd(.*)$ {
149+
proxy_http_version 1.1;
150+
proxy_set_header Host $host;
151+
proxy_set_header X-Forwarded-Proto $scheme;
152+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
153+
proxy_set_header Upgrade $http_upgrade;
154+
proxy_set_header Connection "upgrade";
155+
proxy_pass http://127.0.0.1:7681/$1;
156+
}
157+
```
158+
143159
# AUTHOR
144-
Shuanglei Tao \<[email protected]\> Visit https://github.com/tsl0922/ttyd to get more information and report bugs.
160+
Shuanglei Tao \<[email protected]\> Visit https://github.com/tsl0922/ttyd to get more information and report bugs.

0 commit comments

Comments
 (0)