@@ -10,7 +10,7 @@ ttyd 1 "September 2016" ttyd "User Manual"
10
10
# Description
11
11
ttyd is a command-line tool for sharing terminal over the web that runs in * nix and windows systems, with the following features:
12
12
13
- - Built on top of Libwebsockets with C for speed
13
+ - Built on top of Libwebsockets with libuv for speed
14
14
- Fully-featured terminal based on Xterm.js with CJK (Chinese, Japanese, Korean) and IME support
15
15
- Graphical ZMODEM integration with lrzsz support
16
16
- 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
111
111
112
112
# server certificate (for multiple domains, change subjectAltName to: DNS:example.com,DNS:www.example.com)
113
113
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
115
115
116
116
# client certificate (the p12/pem format may be useful for some clients)
117
117
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
140
140
- Sharing single docker container with multiple clients: docker run -it --rm -p 7681:7681 tsl0922/ttyd.
141
141
- Creating new docker container for each client: ttyd docker run -it --rm ubuntu.
142
142
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
+
143
159
# 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