Commit Graph

99 Commits

Author SHA1 Message Date
Dustin Martin
69b63fcfd7 protocol: ignore resize message if process freed (#968) 2022-08-23 22:00:46 +08:00
Shuanglei Tao
efefd56795 protocol: fix potential pty buf leak on process exit 2022-08-18 12:14:46 +08:00
Shuanglei Tao
6cfd9b29ae protocol: fix potential pty buf leak 2022-08-18 10:38:55 +08:00
Shuanglei Tao
d7db63726c protocol: fix potential null pss access 2022-08-17 16:55:49 +08:00
Shuanglei Tao
bff3a617e6 server: add cwd support 2021-08-16 23:08:05 +08:00
Shuanglei Tao
968f1e6e70 pty: set TTYD_USER env 2021-08-15 14:55:37 +08:00
Shuanglei Tao
e402edf13c server: add auth proxy support 2021-08-13 22:09:30 +08:00
Shuanglei Tao
b2cda1d68c drop libwebsockets < 3.2.0 support 2021-08-10 22:20:56 +08:00
Shuanglei Tao
1e5c5242fd protocol: check basic auth on ws connection 2021-08-08 21:38:30 +08:00
Shuanglei Tao
619bfc34cd pty: set TERM env for the pty process 2021-08-08 20:05:34 +08:00
Shuanglei Tao
c5f414b25a all: remove the vla usage 2021-03-16 21:40:44 +08:00
Shuanglei Tao
2480810eb3 protocol: fix -Wstringop-overflow compile warning 2021-03-14 11:57:57 +08:00
Shuanglei Tao
c0bdd7bb28 protocol: free memory allocated for url args 2021-03-14 11:20:10 +08:00
Shuanglei Tao
21b9aefbe3 protocol: cleanup unused code 2021-03-11 22:56:49 +08:00
Shuanglei Tao
cbb31ea4aa protocol: improve exit code handling 2021-03-07 13:05:29 +08:00
Shuanglei Tao
02bbbec678 pty: rename pty_close to pty_kill 2021-03-06 17:39:05 +08:00
Shuanglei Tao
f67feebcc2 protocol: fix auth token check 2021-03-06 17:37:30 +08:00
Shuanglei Tao
96e88fb4ce protocol: set windows size on spawm process 2021-03-06 14:27:05 +08:00
Shuanglei Tao
52adaba9e1 pty: use uint16_t for resize params 2021-03-05 23:46:57 +08:00
Shuanglei Tao
d6921b235d protocol: add conpty support 2021-03-03 21:02:33 +08:00
Shuanglei Tao
215849b5d0 protocol: fix uv handle closing 2021-02-06 09:28:04 +08:00
Shuanglei Tao
75105f6d48 protocol: use 2 pipe for read and write 2021-02-06 01:03:49 +08:00
Shuanglei Tao
bfb2d0cc86 src: move pty code to protocol 2021-02-03 21:34:41 +08:00
Shuanglei Tao
7ce3081b74 protocol: fix illegal ws path error msg 2021-01-21 20:51:06 +08:00
Shuanglei Tao
4f91d763b4 protocol: fix ws code on process exit 2020-12-31 22:18:22 +08:00
Shuanglei Tao
c14b1fec2f protocol: do not show eof as error 2020-12-28 00:17:03 +08:00
Shuanglei Tao
4ab5479a83 html: implement flow control for xterm
https://xtermjs.org/docs/guides/flowcontrol/#flow-control-over-websockets
2020-12-27 19:37:51 +08:00
Shuanglei Tao
5650606674 protocol: fix incorrect uv_close usage 2020-12-27 13:16:29 +08:00
Shuanglei Tao
f7c171ffbe protocol: fix request path for h2 2020-07-28 22:55:01 +08:00
Shuanglei Tao
f9d23de0fe protocol: improve io error handling 2020-07-27 22:43:28 +08:00
Girts
56d26accd3 protocol: fix readonly handling (#373)
Previously, if running in readonly mode (`-R`), we would keep
accumulating incoming websocket data to `pss->buffer`, resizing it with
every incoming message. This would also break the `RESIZE` operation as
we would never get rid of the `INPUT` message.

Now we discard `INPUT` messages in `readonly` mode, 1) allowing resize
to work and 2) preventing the buffer from growing indefinitely.
2020-06-06 21:51:15 +08:00
Shuanglei Tao
c38cdc3fd7 clang-format: udpate ColumnLimit to 100 and reformat code 2020-03-26 01:27:11 +08:00
Shuanglei Tao
2fdb4c0c03 src: reformat with clang-format 2020-03-14 17:46:26 +08:00
Shuanglei Tao
b0c4ad97f0 all: use the static keyword on functions 2020-03-11 00:54:39 +08:00
Tian Yuanhao
f46744283b protocol: replace uv_try_write with uv_write 2020-03-11 00:39:16 +08:00
Daniel Monteiro Basso
97260858bf Add -b, --base-path option for reverse proxies (#151) (#281)
* Add -b, --base-path option for reverse proxies (#151)
2020-03-10 09:54:34 +08:00
Shuanglei Tao
48f53bcc00 protocol: fix lws callback compatibility 2020-03-10 09:41:35 +08:00
Shuanglei Tao
72dbba3d5a protocol: print signal name 2019-12-15 00:07:19 +08:00
Shuanglei Tao
76eebaaa4a protocol: use uv_kill to kill process 2019-12-14 22:59:56 +08:00
Shuanglei Tao
cb02d79281 protocol: fix json parsing 2019-12-14 22:50:53 +08:00
Shuanglei Tao
b67e382ab8 server: improve child process handling 2019-12-11 21:14:17 +08:00
Shuanglei Tao
cfd338ea5e terminal: set the pty fd non blocking 2019-12-05 23:19:34 +08:00
Shuanglei Tao
ca91f40048 protocol: split forkpty to separate file 2019-12-05 22:28:58 +08:00
Shuanglei Tao
c0ebb57d9e protocol: cleanup pipe handle 2019-11-30 19:24:42 +08:00
Shuanglei Tao
36c9734623 protocol: fix potential double free 2019-11-30 18:48:56 +08:00
Shuanglei Tao
df6f3bd652 protocol: rename tty_client to pss_tty 2019-11-30 17:49:37 +08:00
Shuanglei Tao
f61b9aec11 server: improve signal handling 2019-11-30 17:25:53 +08:00
Shuanglei Tao
fe7bad2c63 server: remove sys/queue dep 2019-11-30 17:25:27 +08:00
Shuanglei Tao
59601329ae libuv: initial support 2019-11-30 15:10:41 +08:00
Shuanglei Tao
6d69f0a55d server: remove the sleep from main loop 2019-11-26 21:55:42 +08:00