Commit Graph

48 Commits

Author SHA1 Message Date
이유비 09ff892aaa [#107] fix: escaped basic token on /ws 2020-11-14 15:25:16 +09:00
이유비 99132e384e fix escaped basic token 2020-11-13 20:25:06 +09:00
이유비 7c22259f18 [#98] use goselect.RetrySelect instead of goselect.Select 2020-11-11 09:52:16 +09:00
이유비 223bfbd795 [#98] should handle EINTR 2020-11-10 10:15:05 +09:00
Roman Nikitin e013e9b9db Autocheck fixed 2020-09-22 12:37:18 +03:00
Roman Nikitin f8268d4ac0 Fixed typos, linter warnings 2020-09-22 12:32:23 +03:00
Manfred Touron 11c91521e2 feat: switch to go mod, refactor build toolchain, CI, etc 2020-04-27 13:18:35 +02:00
Patrik Cyvoct 00386c0e70
fix: panic when using pipes
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2020-04-21 13:53:20 +02:00
Patrik Cyvoct a9a660a943
Change dependencies moby/pkg/term to containerd/console
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2018-05-18 16:46:58 +02:00
Patrik Cyvoct cb2bebbabc
Fix ping message
Init message type before calling ping loop

Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2018-05-08 20:40:00 +02:00
Patrik Cyvoct d8aafdbe17
Fixes #61 by restoring terminal on exit
Use of moby/pkg/term to set to raw terminal and restore after
Replaces terminal of ssh package

Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2018-05-01 19:22:46 +02:00
byung2 47b4beb173 Add --ws-origin option to allow cross origin requests to WS endpoint 2018-04-10 21:05:19 +09:00
byung2 7ffe9b2b6f Add --v2 option for gotty v2.0 support 2018-04-10 21:00:25 +09:00
Loïc Carr 9e68842593 Move escape proxy to another file 2018-03-27 14:58:16 +02:00
Manfred Touron d6705baf85 Add --detach-keys option (fix #52) 2017-12-13 16:56:02 +01:00
tamal 990fa23220 Update github.com/sirupsen/logrus dependency to v1.0.3
ref: https://github.com/sirupsen/logrus/issues/543
2017-10-21 18:28:05 -07:00
Gurjeet Singh e153cff9c8 Implement poison-pill method to exit infinite loops
All cooperating goroutines regularly try to read from the shared "poison"
channel.  If the read succeeds, they exit by calling die(), assuming
somebody else cracked open the poison pill.

When any of these goroutines is done with its job, it signals other
goroutines to exit by calling open_poison() on the shared channel.

This approach takes advantage of the fact that reads from a closed
channel always succeed.

The driving goroutine (Client.Loop() in this case), is called from the
"main" goroutine. And because when the "main" goroutine exits, the whole
program exit (using os.Exit()) irrepective of liveness of other goroutines,
we could not use the same "poison" channel to wait in the driving goroutine.

Instead, we use sync.WaitGroup to wait for spawned goroutines, because
we want the spawned goroutines to cleanup and exit cleanly.
2016-12-17 14:00:47 -08:00
Gurjeet Singh 3e895cf209 Do not exit on EOF
Forward the EOF to GoTTY, and let the server-side decide if it wants to
terminate the connection. The server closes the connection, and in
response we terminate the readLoop which in turn signals writeLoop to
terminate via the QuitChan.

This allows for the user to pipe commands to gotty-client, and capture
all the result sent by the server. For eg. when gotty is launched as
`gotty -w bash`, the following command would now wait to capture all
output from the server.

for (( i = 0 ; i < 2; ++i )); do echo echo $i; echo sleep 2; done | ./gotty-client https://gotty.example.com

Before this patch, gotty-client used to exit on encountering EOF from
the left side of the pipe.
2016-11-07 15:36:48 -08:00
Quentin Perez 75dcc71909
Fix race condition 2016-05-24 10:41:51 +02:00
lhb b65d82045a Add Proxy support 2016-02-24 17:54:33 +09:00
Quentin Perez d5df9cce0e maligned: struct of size 80 could be 72 2016-02-20 15:56:14 +01:00
Manfred Touron d07f4c2d62
Rewrite imports for godep 2016-01-04 12:27:45 +01:00
Mickaël Thomas c8cae01560 Fix terminal data being interpreted as format string.
This caused invalid % sequences to be replaced with %!X(MISSING) in the terminal.
2015-12-30 06:27:56 +01:00
Manfred Touron fad5173a1b
Support of --skip-tls-verify 2015-12-09 18:58:57 +01:00
Manfred Touron dcf603df90 Merge pull request #32 from QuentinPerez/patch-1
Don't print buff if an error occurred
2015-11-19 00:56:46 +01:00
Quentin Perez f6d1fcac25 Don't print buff if an error occurred 2015-11-19 00:23:01 +01:00
Quentin Perez 2effb888f5 Remove some OS from .goxc.json file 2015-11-19 00:15:13 +01:00
Manfred Touron c7186d44ee
Flexible parsing of the input URL 2015-11-01 19:31:46 +01:00
Quentin Perez 473147bf82 Add QuitChanClosed 2015-10-26 13:16:59 +01:00
Quentin Perez d7dde17035 Fix connected state 2015-10-26 13:07:17 +01:00
Quentin Perez f23451bd9c Add ExitLoop 2015-10-26 13:00:19 +01:00
Quentin Perez 0064e3e0cb Fix #21 2015-10-23 16:30:23 +02:00
Quentin Perez d3fb7efdfc Fix #22 2015-10-23 16:23:46 +02:00
Quentin Perez c318d94118 Review the goroutines in Loop 2015-10-23 15:16:50 +02:00
Quentin Perez d2ee8301aa Remove warning on querySingle variable 2015-10-22 17:35:05 +02:00
Manfred Touron e69260feb1
Add debug mode (fix #18) 2015-10-13 17:02:38 +02:00
Manfred Touron 217058435b
Improve error message when connecting 2015-10-13 16:41:37 +02:00
Manfred Touron db6826f2cd
Fix arguments passing (fix #16) 2015-10-12 18:07:50 +02:00
Manfred Touron 97da70dfb7
Fix panic when running on older GoTTY server (#13) 2015-10-10 23:08:23 +02:00
Quentin Perez ab107d779e Handle multipe argurments 2015-09-30 18:08:20 +02:00
Manfred Touron 001d1f353b
party -c -t -d=vendor 2015-09-27 21:49:24 +02:00
Manfred Touron 72597de5c3
Bumped GoTTY protocol for GoTTY@0.10 2015-09-19 03:40:42 +02:00
Manfred Touron 2ce7c93832
Handling Basic Auth 2015-08-26 09:29:52 +02:00
Manfred Touron 298a302026
Handling tty size 2015-08-25 13:30:04 +02:00
Manfred Touron d3a30fd41c
Set terminal to raw mode 2015-08-25 12:11:21 +02:00
Manfred Touron e1e185cc7f
Added write support 2015-08-24 22:53:35 +02:00
Manfred Touron ee8195320f
Handling title 2015-08-24 22:10:47 +02:00
Manfred Touron 4b4cf1246d
Initial version 2015-08-24 18:48:27 +02:00