Commit Graph

83 Commits

Author SHA1 Message Date
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
Shuanglei Tao
9126d54108 protocol: set pty fd close-on-exec 2019-09-28 23:31:15 +08:00
Shuanglei Tao
62844c2509 src: fix exit code check on linux 2019-09-15 19:07:02 +08:00
Shuanglei Tao
5381d0f825 all: remove pthread 2019-09-15 18:39:30 +08:00
ideal
4ad0cc86b7 Fix for upgrade of libwebsockets 3.2.0, it removes the poll which breaks every second in the previous version.
Reference:
[1] https://github.com/warmcat/libwebsockets/issues/1685
[2] https://libwebsockets.org/git/libwebsockets/tree/READMEs/README.lws_sul.md
2019-09-14 19:53:54 +08:00
Shuanglei Tao
671427b150 src: fallback to lws_get_peer_addresses on old libwebsockets 2019-09-03 22:29:27 +08:00
Shuanglei Tao
251ad41f4c server: fix pthread_mutex_trylock usage 2019-08-04 11:59:34 +08:00
Shuanglei Tao
0fc275f3a3 server: remove the reconnect option (enabled by default) 2019-07-05 23:09:07 +08:00
Shuanglei Tao
513c64cb0c protocol: remove the O_NONBLOCK flag on pty fd
it breaks zmodem support for rz
2019-06-30 12:35:30 +08:00
Shuanglei Tao
7901265f52 http: remove hack for old libwebsocket versions 2019-06-22 15:23:24 +08:00
Shuanglei Tao
e73a8e8587 protocol: cleanup process without hanging 2019-05-11 10:05:51 +08:00
Shuanglei Tao
4cd6d480d6 protocol: set the pty file descriptor non blocking 2019-04-21 10:22:37 +08:00
Shuanglei Tao
d5a542d0dc protocol: do not block main thread when destroying client 2019-04-21 07:17:07 +08:00
Shuanglei Tao
74e091f954 server: add support for cli args via url 2019-04-14 22:28:03 +08:00
Santosh Kumar Gupta
f95cacd61b protocol: exit thread as soon as the command terminate, fixes #112 2019-03-25 11:46:38 +08:00
Shuanglei Tao
154cacce64 protocol: kill process group 2019-03-16 21:23:18 +08:00
dmayle
0b44b9b943 Close the websocket after forking so that child processes don't prevent new connections (#162) 2019-03-16 11:08:37 +08:00