Commit Graph

167 Commits (master)

Author SHA1 Message Date
Chip Senkbeil 41d35f88de
Fix handling of IPv6 for Destination and DistantSingleKeyCredentials 2 years ago
Chip Senkbeil 768dbdc053
Rewrite Destination to no longer use uriparse library 2 years ago
Chip Senkbeil 86b34d23c6
Fix ssh settings not getting applied, ssh.bin being mispelled, and added ClientConnectConfig 2 years ago
Chip Senkbeil 9097892c61
Move access control to be manager-specific 2 years ago
Chip Senkbeil 0633530a13
Expose `windows-pipe` and `unix-socket` regardless of platform 2 years ago
Chip Senkbeil 44b0dc065c
Split fallback_scheme into launch and connect choices 2 years ago
Chip Senkbeil 4223c4e03f
Fix json support for client launch/connect and add json format support for client select (#118) 2 years ago
Chip Senkbeil 5e1b6e7c51
Update cache to not fail on read error 2 years ago
Chip Senkbeil b9d2e2e57e
Update termwiz 0.15.0 -> 0.17.1 2 years ago
Chip Senkbeil ea2e128bc4
Refactor to use distant manager (#112) 2 years ago
Chip Senkbeil 4180ae279a
Bump to 0.16.4 and fix #80 and fix #102 2 years ago
Chip Senkbeil 329213dbe4
Add --ssh-backend support to cli and bump to 0.16.3 2 years ago
Chip Senkbeil 268ec948d6
Add filesystem watching & remove distant-lua (#102) 2 years ago
Chip Senkbeil f46eeea8d5
Add environment as new output session type and change defaults to environment for CLI (#98) 2 years ago
Chip Senkbeil 3794466dd0
Add windows & unix optional metadata (#96) 2 years ago
Chip Senkbeil 0308343794
Rename detached to persist (#94) 2 years ago
Chip Senkbeil 050bb3496a
Complete shell support (#89) 2 years ago
Chip Senkbeil c6c07c5c2c
Unfinished pty support, renaming ProcRun -> ProcSpawn and ProcStarted -> ProcSpawned, switch ProcStdin/ProcStdout/ProcStderr to use Vec<u8> instead of String, update RemoteProcess and RemoteLspProcess to support reading/writing string and vec<u8> 2 years ago
Chip Senkbeil 8c234f95d0
Support json ssh auth (#83)
* Add support for JSON communication of ssh auth during launch
* Switch to cbor alternative lib as serde cbor has been abandoned
* Refactor some request & response types to work with new cbor lib
* Update cli to always include serde dep
* Expose origin_id of remote process as method
2 years ago
Chip Senkbeil 2c0883878d
Add --key-from-stdin option to listen cli command to read key from stdin instead of generating 3 years ago
Chip Senkbeil 6d0e54bfa1
Remove --daemon in favor of opposite parameter --foreground 3 years ago
Chip Senkbeil 4050a421bc
Add spacing and change to DISTANT CONNECT from DISTANT DATA 3 years ago
Chip Senkbeil c2e588544f
Update wezterm-ssh dep to 0.2.0, fix ssh -> distant session, refactor session to have optional details included 3 years ago
Chip Senkbeil 043ae6ca4b
Couple of changes:
1. Add support to detach processes from distant server
2. Refactor distant_bin and distant_args to distant.bin and distant.args
3. Add use_login_shell option for launch distant opts
3 years ago
Chip Senkbeil 16bed4690b
Add lua lib & support compiling distant cli on windows (#59)
* Update distant-ssh2 with new changes to wezterm-ssh
* Implement lua module (distant-lua)
* Implement tests for lua module (distant-lua-tests)
* Add untested windows daemon support
* distant binary now compiles on windows
* Split up Github actions for Windows, MacOS, and Linux into individual yaml files
3 years ago
Chip Senkbeil 97536c7b2b
Refactor Metadata and SystemInfo response data types to support subtypes as singular parameters 3 years ago
Chip Senkbeil e586891463
Update to 0.15.0-alpha.2
* Rename SessionExt -> SessionChannelExt
* Rename SessionExtError -> SessionChannelExtError
* Update SessionChannel to implement SessionChannelExt
* Update Session to not implement SessionChannelExt as it gets this for
  free through Deref/DerefMut targeting SessionChannel
3 years ago
Chip Senkbeil 0a11ec65a2
Add native ssh (#57)
* Bump to 0.15.0
* Add new distant-ssh2 subcrate to provide an alternate session as an ssh client
* Add rpassword & wezterm-ssh dependencies
* Rename core -> distant-core in project directory structure and move ssh2 feature into distant-ssh2 crate
* Upgrade tokio to 1.12,
* Update github actions to detect changes and apply testing for only those changes
* Add method parameter to support distant & ssh methods for action and lsp subcommands
* Add ssh-host, ssh-port, and ssh-user parameters to specify information for ssh method
3 years ago
Chip Senkbeil 2277f9634d
Replace DISTANT_AUTH_KEY with DISTANT_KEY for environment variable parsing 3 years ago
Chip Senkbeil 3c15a90886
Fix log suppression to occur when running remote process and not logging to a file 3 years ago
Chip Senkbeil c4d1011b14
Add session ext (#53)
* Add `SessionExt` trait for friendlier methods
* Create `Mailbox` and internal `PostOffice` to manage responses to requests
* Refactor `Session` to use a new `SessionChannel` underneath
* Refactor `Response` to always include an origin_id field instead of being optional
* Update `ProcStdout`, `ProcStderr`, and `ProcDone` to include origin id
* Replace `verbose` option with `log-level`
3 years ago
Chip Senkbeil e4273a1be9
Refactor codec (#47)
* Remove DistantCodec
* Add Codec trait to support encode & decode
* Add XChaCha20Poly1305 dependency in place of orion
* Add XChaCha20Poly1305Codec that encrypts/signs using XChaCha20Poly1305
* Add PlainCodec that does no encrypting/signing
* Refactor Transport to take generic Codec
* Rewrite to no longer use blake256
* Remove k256 dependency
* Remove Transport::from_handshake as no longer doing EDCH key exchange
* Fix stdout/stderr being sent before proc_start by adding post_hook support to handler such that proc_run tasks are not spawned until proc_start is sent as response
* Remove unneeded else if condition when checking join error type
3 years ago
Chip Senkbeil 35fa1197da
Update remote process execution to automatically disabling logging to console; add sleep before checking file write/append results to account for delays from OS 3 years ago
Chip Senkbeil 756b87a8ae
Fix json format for interactive proc run requests 3 years ago
Chip Senkbeil cf95181418
Fix new clippy warnings, remove windows tests for cli as it does not support windows yet 3 years ago
Chip Senkbeil 34d6b574c1
Fix clippy warnings, fix rustfmt, refactor proc-run tests to use generated scripts instead of script files 3 years ago
Chip Senkbeil ec4f635dbe
Clean up clippy warnings 3 years ago
Chip Senkbeil 9bd2112344
Refactor listener (#38)
* Finish implementing new listener logic

* Refactor cli tests to work with new format

* Implement tests for remote process

* Fix bugs in LSP stdout, stderr, and stdin

* Add tests for LSP remote process

* Update metadata request & response to support resolving the file type of symlinks
3 years ago
Chip Senkbeil cf0193edc9
Add some extra logging and complete proc-run cli tests 3 years ago
Chip Senkbeil b362ff5ab8
Fix process cleanup happening when only half of a tranport has closed 3 years ago
Chip Senkbeil f66a234873
Unfinished tests for proc-run cli 3 years ago
Chip Senkbeil e3cfbd5968
Refactor exists to print true/false in shell format 3 years ago
Chip Senkbeil 8cdc9f271d
Refactor distant binary to yield software exit code when oneoff operation fails 3 years ago
Chip Senkbeil 188b5f74e4
Add first example of an e2e test for distant cli 3 years ago
Chip Senkbeil df81894785
Split distant into distant-core and distant (bin) 3 years ago
Chip Senkbeil 156fe50423
Remove tokio-stream dependency 3 years ago
Chip Senkbeil fcdd1ebd48
Add more test outlines for process & lsp process of core client 3 years ago
Chip Senkbeil 07cd434e98
Refactor DistantServer to support initialization using any listener 3 years ago
Chip Senkbeil 16af8b06e2
Fix shutdown immediately happening when time not provided 3 years ago
Chip Senkbeil 260cb0e99d
Refactor session to use mpsc instead of broadcast channel, add LSP command 3 years ago
Chip Senkbeil ba6ebcfcb8
Refactor codebase to be more testable & add some initial tests 3 years ago
Chip Senkbeil 1ca3cd7859
Big refactor that is not finished 3 years ago
Chip Senkbeil 2b23cd379c
Rename mode -> format; bump to 0.13.0 3 years ago
Chip Senkbeil 33abcbb5fb
Update logger to properly shutdown when process exits 3 years ago
Chip Senkbeil 69af44cb8e
Add lsp session mode w/ parser and tests 3 years ago
Chip Senkbeil f12c3428eb
Move around some net structs and impls to their own modules, add some client tests 3 years ago
Chip Senkbeil aded5fd16f
Merge branch 'master' of github.com:chipsenkbeil/distant 3 years ago
Chip Senkbeil e857dabe43
Add tests for codec and transport; move net::client to dedicated file 3 years ago
Chip Senkbeil 160631bc7b
Add login shell support by defualt to run distant command on launch 3 years ago
Chip Senkbeil f6e9195503
Update error response to include kind, refactor kind to be from a defined set, support new exists request/response 3 years ago
Chip Senkbeil e2fd3a9bae
Add proper exit codes mirroring sysexits from FreeBSD 3 years ago
Chip Senkbeil 86e4d7f2fc
Refactor to support a payload for request/response with multiple entries; bump to 0.10.0 3 years ago
Chip Senkbeil 24d0c3b2ab
Bump to v0.9.5 and update couple of cli descriptions 3 years ago
Chip Senkbeil fac7687f27
Remove excessive trace logging of send/recv at transport level as this isn't useful 3 years ago
Chip Senkbeil 1a1f219594
Update DirRead to sort returned paths by name 3 years ago
Chip Senkbeil 809baaee85
Add extra aliases for different actions like creating a dir and running a process 3 years ago
Chip Senkbeil f51b8420f3
Update metadata human printout to not include canonicalized_path if missing 3 years ago
Chip Senkbeil 9a67418227
Add option to metadata request to return the canonicalized path in the response; bump to 0.9.0 3 years ago
Chip Senkbeil d3a1cad7b3
Fix bug where socket not cleared when fail flag disabled; fix shutdown timer logic 3 years ago
Chip Senkbeil 956f7e0119
Unfinished timing 3 years ago
Chip Senkbeil df80f261bc
Add client timeout support, system info message, and support for including root path in retrieved dir entries 3 years ago
Chip Senkbeil cbefdb69ec
Fix stdout/stderr not being detected in proc response when no newline was provided 3 years ago
Chip Senkbeil b3a4d79507
Update stdin/stdout/stderr pipes to read into buffers instead of waiting for newlines 3 years ago
Chip Senkbeil a15a707f1d
Fix processes lingering for unix socket proxy when a connection closes 3 years ago
Chip Senkbeil 638638f332
Refactor ProcStdin to send a string representing a line instead of a vec of bytes 3 years ago
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
3 years ago
Chip Senkbeil d4775477aa
Refactor codebase into cli and core modules, add unix socket support, bump to 0.5.0 3 years ago
Chip Senkbeil bb7829e3f0
Add support for launch to be interactive 3 years ago
Chip Senkbeil d9c2b9942a
Consolidate session production to just the session struct 3 years ago
Chip Senkbeil de69b419a4
Fix CPU pegging when stdin stream has closed 3 years ago
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
3 years ago
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 3 years ago
Chip Senkbeil 3c68bb3377
Add metadata request & response; bump to 0.3.1 3 years ago
Chip Senkbeil f24bb6067d
Rename send -> action and bump to 0.3.0 3 years ago
Chip Senkbeil 3cbdfb19d9
Add extra session commands 3 years ago
Chip Senkbeil fa71e40982
Fix failures not returning a bad exit code 3 years ago
Chip Senkbeil 878c27742a
Fix file_type being null in json 3 years ago
Chip Senkbeil b4706e88bc
Add interactive loop for shell and json modes; fix some minor discrepancies 3 years ago
Chip Senkbeil c7b8db517c
Rename format to mode; remove unsupported --detach option on proc-run 3 years ago
Chip Senkbeil b9cec3399b
Rename ADDRESS to HOST for positional host argument of launch command 3 years ago
Chip Senkbeil bada62c7da
Remove unused --use-ipv6 option on launch command 3 years ago
Chip Senkbeil c7c9c237d7
Merge human and shell format types 3 years ago
Chip Senkbeil 72870b2b7d
Change file logging to include timestamp and remove exposure of derived crypt key 3 years ago
Chip Senkbeil 54d61fe5b3
Add support for encryption using derived common secret and introduce authentication using an auth secret 3 years ago
Chip Senkbeil 676a89427b
Add support for changing cwd of server, which starts at / by default when launched over ssh 3 years ago
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 3 years ago
Chip Senkbeil f59ae7f6ed
Fix dropped messages on client side and lockup of transport when trying to read and write concurrently 3 years ago
Chip Senkbeil 6ef55d6e38
Rename format type shell -> human and program -> shell 3 years ago
Chip Senkbeil 79fe86ae15
Update into_split to reuse buffers; fix newline appearing after stdout/stderr from program 3 years ago
Chip Senkbeil f090aa8fc3
Refactor clear-session into session clear 3 years ago