Commit Graph

119 Commits

Author SHA1 Message Date
Chip Senkbeil
16af8b06e2
Fix shutdown immediately happening when time not provided 2021-08-28 15:14:31 -05:00
Chip Senkbeil
260cb0e99d
Refactor session to use mpsc instead of broadcast channel, add LSP command 2021-08-28 02:13:30 -05:00
Chip Senkbeil
ba6ebcfcb8
Refactor codebase to be more testable & add some initial tests 2021-08-25 21:33:27 -05:00
Chip Senkbeil
1ca3cd7859
Big refactor that is not finished 2021-08-25 21:33:11 -05:00
Chip Senkbeil
2b23cd379c
Rename mode -> format; bump to 0.13.0 2021-08-25 21:33:06 -05:00
Chip Senkbeil
33abcbb5fb
Update logger to properly shutdown when process exits 2021-08-19 00:35:07 -05:00
Chip Senkbeil
69af44cb8e
Add lsp session mode w/ parser and tests 2021-08-19 00:34:54 -05:00
Chip Senkbeil
f12c3428eb
Move around some net structs and impls to their own modules, add some client tests 2021-08-18 03:57:42 -05:00
Chip Senkbeil
aded5fd16f
Merge branch 'master' of github.com:chipsenkbeil/distant 2021-08-18 02:37:38 -05:00
Chip Senkbeil
e857dabe43
Add tests for codec and transport; move net::client to dedicated file 2021-08-18 02:34:04 -05:00
Chip Senkbeil
160631bc7b
Add login shell support by defualt to run distant command on launch 2021-08-16 14:01:13 -05:00
Chip Senkbeil
f6e9195503
Update error response to include kind, refactor kind to be from a defined set, support new exists request/response 2021-08-15 16:18:55 -05:00
Chip Senkbeil
e2fd3a9bae
Add proper exit codes mirroring sysexits from FreeBSD 2021-08-14 01:27:35 -05:00
Chip Senkbeil
86e4d7f2fc
Refactor to support a payload for request/response with multiple entries; bump to 0.10.0 2021-08-10 12:42:14 -05:00
Chip Senkbeil
24d0c3b2ab
Bump to v0.9.5 and update couple of cli descriptions 2021-08-08 13:14:55 -05:00
Chip Senkbeil
fac7687f27
Remove excessive trace logging of send/recv at transport level as this isn't useful 2021-08-07 14:29:40 -05:00
Chip Senkbeil
1a1f219594
Update DirRead to sort returned paths by name 2021-08-07 00:39:28 -05:00
Chip Senkbeil
809baaee85
Add extra aliases for different actions like creating a dir and running a process 2021-08-06 13:10:07 -05:00
Chip Senkbeil
f51b8420f3
Update metadata human printout to not include canonicalized_path if missing 2021-08-06 12:52:20 -05:00
Chip Senkbeil
9a67418227
Add option to metadata request to return the canonicalized path in the response; bump to 0.9.0 2021-08-06 12:27:59 -05:00
Chip Senkbeil
d3a1cad7b3
Fix bug where socket not cleared when fail flag disabled; fix shutdown timer logic 2021-08-06 01:08:56 -05:00
Chip Senkbeil
956f7e0119
Unfinished timing 2021-08-05 22:35:06 -05:00
Chip Senkbeil
df80f261bc
Add client timeout support, system info message, and support for including root path in retrieved dir entries 2021-08-05 19:46:46 -05:00
Chip Senkbeil
cbefdb69ec
Fix stdout/stderr not being detected in proc response when no newline was provided 2021-08-05 13:42:25 -05:00
Chip Senkbeil
b3a4d79507
Update stdin/stdout/stderr pipes to read into buffers instead of waiting for newlines 2021-08-05 09:39:22 -05:00
Chip Senkbeil
a15a707f1d
Fix processes lingering for unix socket proxy when a connection closes 2021-08-04 22:47:20 -05:00
Chip Senkbeil
638638f332
Refactor ProcStdin to send a string representing a line instead of a vec of bytes 2021-08-04 21:17:08 -05:00
Chip Senkbeil
4edf8021cc
Add features and fixes for upcoming 0.6.0
1. Capture errors when listing directory contents and report them
   as part of the response instead of exiting on first error
2. Refactor DirRead request to support providing a depth (instead
   of the "all" flag), canonicalizing the paths, and have the choice
   of returning absolute paths instead of relative
3. Fix forked process for launch not connecting over TCP to
   server due to tokio runtime being inherited from parent
4. Fix leftover launch process caused by forking w/ the old runtime
5. Fix stdout/stderr of running processes not being reported
   (when process looping and not returning) by wrapping stdout/stderr
   in `BufReader` and sending back one line at a time for each
6. Refactor ProcStdout and ProcStderr responses to send back a line
   field that is a string instead of a data field that is a byte vec
   as we are now reading and sending back whole lines, which makes
   more sense and aligns with output flushing and common stdout/stderr
   processing by other programs
2021-08-04 20:43:02 -05:00
Chip Senkbeil
d4775477aa
Refactor codebase into cli and core modules, add unix socket support, bump to 0.5.0 2021-08-03 21:41:51 -05:00
Chip Senkbeil
bb7829e3f0
Add support for launch to be interactive 2021-08-02 23:24:35 -05:00
Chip Senkbeil
d9c2b9942a
Consolidate session production to just the session struct 2021-08-02 21:18:50 -05:00
Chip Senkbeil
de69b419a4
Fix CPU pegging when stdin stream has closed 2021-08-02 20:32:44 -05:00
Chip Senkbeil
a7dd0eb435
Refactor codebase with breaking changes
1. Add --session argument to launch and action
   subcommands that accepts file or pipe for
   launch and environment, file, or pipe for action
2. Unify session string as "DISTANT DATA <host> <port> <auth key>"
3. Rename utils to session
4. Split out Session file functionality to SessionFile
5. Remove SessionError in favor of io::Error
6. Bump version to 0.4.0 in preparation for that release
2021-08-02 19:57:38 -05:00
Chip Senkbeil
d1e342f04f
Fix bug where writing file did not work from cli, add text options for write and append, bump to 0.3.2 2021-08-01 19:40:44 -05:00
Chip Senkbeil
3c68bb3377
Add metadata request & response; bump to 0.3.1 2021-08-01 17:34:34 -05:00
Chip Senkbeil
f24bb6067d
Rename send -> action and bump to 0.3.0 2021-08-01 14:48:24 -05:00
Chip Senkbeil
3cbdfb19d9
Add extra session commands 2021-08-01 03:55:28 -05:00
Chip Senkbeil
fa71e40982
Fix failures not returning a bad exit code 2021-08-01 00:13:49 -05:00
Chip Senkbeil
878c27742a
Fix file_type being null in json 2021-07-31 20:31:53 -05:00
Chip Senkbeil
b4706e88bc
Add interactive loop for shell and json modes; fix some minor discrepancies 2021-07-31 00:31:14 -05:00
Chip Senkbeil
c7b8db517c
Rename format to mode; remove unsupported --detach option on proc-run 2021-07-30 21:46:12 -05:00
Chip Senkbeil
b9cec3399b
Rename ADDRESS to HOST for positional host argument of launch command 2021-07-30 20:11:39 -05:00
Chip Senkbeil
bada62c7da
Remove unused --use-ipv6 option on launch command 2021-07-30 20:10:38 -05:00
Chip Senkbeil
c7c9c237d7
Merge human and shell format types 2021-07-30 12:52:59 -05:00
Chip Senkbeil
72870b2b7d
Change file logging to include timestamp and remove exposure of derived crypt key 2021-07-28 22:50:24 -05:00
Chip Senkbeil
54d61fe5b3
Add support for encryption using derived common secret and introduce authentication using an auth secret 2021-07-28 22:38:37 -05:00
Chip Senkbeil
676a89427b
Add support for changing cwd of server, which starts at / by default when launched over ssh 2021-07-28 20:22:35 -05:00
Chip Senkbeil
3a2749fd7f
Add support for piping stdin to remote proccess and reduce size of packets to just include the total bytes as a header 2021-07-28 20:00:55 -05:00
Chip Senkbeil
f59ae7f6ed
Fix dropped messages on client side and lockup of transport when trying to read and write concurrently 2021-07-28 15:51:42 -05:00
Chip Senkbeil
6ef55d6e38
Rename format type shell -> human and program -> shell 2021-07-28 03:39:04 -05:00
Chip Senkbeil
79fe86ae15
Update into_split to reuse buffers; fix newline appearing after stdout/stderr from program 2021-07-28 03:31:21 -05:00
Chip Senkbeil
f090aa8fc3
Refactor clear-session into session clear 2021-07-28 02:41:10 -05:00
Chip Senkbeil
b48a5c1a2b
Fix program not being option -- still seeing dropped frames (testing with zsh repeat) 2021-07-28 02:26:19 -05:00
Chip Senkbeil
4c249abf6a
Fix (maybe) issue about first frame being dropped on new client 2021-07-28 02:20:27 -05:00
Chip Senkbeil
4c69584f63
Process is now sort of working, but not reliable enough 2021-07-28 02:00:10 -05:00
Chip Senkbeil
24a8cf8401
Refactored listener code into a handler module, wrote support to split transport into read and write halves, implemented most of backend although process run is not working yet 2021-07-28 01:32:20 -05:00
Chip Senkbeil
a707523fb5
Implement file I/O commands 2021-07-27 21:14:01 -05:00
Chip Senkbeil
f2cce4aa34
Refactor code to have request/response format w/ client wrapper for easier processing 2021-07-27 19:07:16 -05:00
Chip Senkbeil
f6fa3e606e
Fix CPU pegging of server (unnecessary transport loop), add extra server args option, and adjust default port settings to be TCP friendly 2021-07-27 17:08:00 -05:00
Chip Senkbeil
e4bdde8aae
Update with proper logging; fix bad host parsing 2021-07-27 13:58:16 -05:00
Chip Senkbeil
801265a258
Fixed transport issue due to packed problems 2021-07-27 00:48:55 -05:00
Chip Senkbeil
3c7561bef8
Implemented broken framed logic 2021-07-27 00:14:35 -05:00
Chip Senkbeil
a52fb82fbf
Add response type and associated data; add operation to send stdin to remote process 2021-07-26 06:50:52 -05:00
Chip Senkbeil
9d7be8b4d7
Refactor operations to be both cli and request data 2021-07-26 05:47:43 -05:00
Chip Senkbeil
f09cca80f1
Minor cosmetics 2021-07-26 03:58:39 -05:00
Chip Senkbeil
ccd23a2fdc
Support port range binding 2021-07-26 03:42:59 -05:00
Chip Senkbeil
273e55fa0b
Refactor to create tokio runtimes within commands instead of at main 2021-07-26 02:45:06 -05:00
Chip Senkbeil
1b7d017c14
Implement some of the session setup code 2021-07-26 00:26:04 -05:00
Chip Senkbeil
b506943607
Initial commit 2021-07-25 21:02:51 -05:00