All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- BREAKING: Migrated
distant-ssh2fromwezterm-sshto pure Rust SSH libraries (russh,russh-sftp)- Removed
libsshandssh2backend feature flags - now uses pure Rust implementation only - Removed
SshBackendenum - no longer needed as only one backend is supported - Improved reliability and removed dependency on bug-ridden C libraries (libssh-rs, ssh2-rs)
- Removed
- Full
russh-sftpintegration with lazy session caching for 10-40x performance improvement - SSH config file parsing via
ssh2-config-rsfor automatic host configuration - Proper PTY support with window resizing capability
- Support for both simple (non-PTY) and PTY process spawning over SSH
set_permissionsnow works correctly over SSH (was broken in wezterm-ssh)- Process termination over SSH now works reliably (proc_kill)
- Improved error handling and reporting throughout SSH operations
- Dependency on
wezterm-ssh,async-compat,smol libsshandssh2feature flags and backend selection- C library dependencies (libssh, ssh2)
- Search and file watching features are not supported over SSH (return
Unsupportederror) - Users can implement custom search/watch functionality using
proc_spawnwith shell commands - MSRV remains at 1.70.0
- Bug in
distant fs set-permissionswhere partial permissions such asgo-wwould result in clearing all permissions - Bug in
distant-localimplementation ofSetPermissionswhere read-only status was being set/cleared prior to Unix permissions being applied, resulting in applying an invalid change to the permissions
All changes described in these alpha releases:
- Alpha 13
- Alpha 12
- Alpha 11
- Alpha 10
- Alpha 9
- Alpha 8
- Alpha 7
- Alpha 6
- Alpha 5
- Alpha 4
- Alpha 3
- Alpha 2
- Alpha 1
- When terminating a connection using
distant manager kill, the connection is now properly dropped, resulting servers waiting to terminate due to--shutdown lonely=Nto now shutdown accordingly - Zombies from spawned servers via
distant launch manager://localhostare now properly terminated by checking the exit status of processes
- Support for
--shellwith optional path to an explicit shell as an option when executingdistant spawnin order to run the command within a shell rather than directly semvercrate to be used for version information in protocol and manageris_compatible_withfunction to root ofdistant-protocolcrate that checks if a provided version is compatible with the protocol
distant_protocol::PROTOCOL_VERSIONnow uses the crate's major, minor, and patch version at compile-time (parsed viaconst-strcrate) to streamline version handling between crate and protocol- Protocol and manager now supply a version request instead of capabilities and
the capabilities of protocol are now a
Vec<String>to contain a set of more broad capabilities instead of every possible request type
- CLI commands like
distant manager selectwill now output errors in a JSON format when configured to communicate using JSON distant-ssh2no longer caches the remote family globally, but instead caches it perSshinstance
Cmd::programandCmd::argumentsfunctions as they were misleading (didn't do whatdistant-localordistant-ssh2do)- Removed
CapabilityandCapabilitiesfrom protocol and manager
- Minimum Rust version is now
1.70.0due to bump ingrep-climinimum requirement. This technically applied to v0.20.0-alpha.11, but wasn't caught until the dependency updated
distant --helpwill now return exit code of 0distant --versionwill now return exit code of 0
- CLI now supports
-c <STR>and--cmd <STR>to use a given string as the command as an alternative to-- <CMD> <ARG> <ARG> - Add build for FreeBSD
- Cli no longer uses
-cas shorthand for specifying a config file --fileoption for generating completion has been renamed to--output- CLI command to generate config files now defaults to printing to stdout with
--outputproviding the option to write to a file - Artifacts built now use format of
distant-<TRIPLE>
use_hidden,use_ignore_files,use_parent_ignore_files,use_git_ignore,use_global_git_ignore, anduse_git_excludeas new options for searching
- Searching now disables all standard filters by default with re-introducing the ability to set the filters by individual options
- Failing to start a search will no longer cause the search task to exit when using the local server, which would result in no more searches being able to be executed
RequestandResponsetypes fromdistant-netnow support an optionalHeaderto send miscellaneous information
Changestructure now provides a singlepathinstead ofpathswith thedistant-localimplementation sending a separateChangedevent per pathChangeDetailsnow includes arenamedfield to capture the new path name when knownDistantApinow handles batch requests in parallel, returning the results in order. To achieve the previous sequential processing of batch requests, the header valuesequenceneeds to be set to true- Rename
GenericServerReftoServerRefand removeServerReftrait, refactoringTcpServerRef,UnixSocketServerRef, andWindowsPipeServerRefto use the struct instead ofBox<dyn ServerRef> - Update
Replytrait and associated implementations to be non-blocking & synchronous as opposed to asynchronous to avoid deadlocks and also be more performant
- Username and password now support full character sets outside of
@for passwords and:and@for usernames
distant-localnow has two features:macos-fseventandmacos-kqueue. These are used to indicate what kind of file watching to support (for MacOS). The default ismacos-fsevent.[server.watch]configuration is now available with the following settings:native = <bool>to specify whether to use native watching or polling (default true)poll_interval = <secs>to specify seconds to wait between polling attempts (only for polling watcher)compare_contents = <bool>to specify how polling watcher will evaluate a file change (default false)debounce_timeout = <secs>to specify how long to wait before sending a change notification (will aggregate and merge changes)debounce_tick_rate = <secs>to specify how long to wait between event aggregation loops
distant-protocolresponse for a change now supports these additional fields:timestamp(serialized asts) to communicate the seconds since unix epoch when the event was receiveddetailscontainingattributes(clarify changes on attribute kind) andextra(to convey arbitrary platform-specific extra information)
- Bump minimum Rust version to 1.68.0
crossbeam-channeldependency removed from notify by disabling its feature in order to avoid atokio::spawnissue (notify-rs/notify#380)
- usernames with
-(hyphen) we're rejected as invalid
- New
SetPermissionsenum variant on protocol request - New
set_permissionsmethod availableDistantApiand implemented by local server (ssh unavailable due to wezterm/wezterm#3784) - Implementation of
DistantChannelExt::set_permissions distant versionto display information about connected serverdistant manager service installnow accepts additional arguments to provide the manager on startup
- CLI
--lsp [<SCHEME>]scheme now expects just the scheme and not:// - Moved
distant_net::common::authenticationto separate cratedistant-auth - Moved
distant_net::common::authentication::Keychaintodistant_net::common::Keychain - Moved
distant_net::common::transport::framed::codec::encryption::SecretKeyand similar todistant_net::common::SecretKey - Search matches reported with
matchkey are now inlined as either a byte array or a string and no longer an object with atypeandvaluefield - Unset options and values are not now returned in
JSONserialization versus the explicitnullvalue provided Capabilitiesmessage type has been changed toVersionwith new struct to report the version information that includes a server version string, protocol version tuple, and capabilitiesdistant_core::api::localmoved todistant_local
distant capabilitieshas been removed in favor ofdistant version
- Renamed
distant_core::datatodistant_core::protocol - CLI
--lspnow accepts an optionalschemeto be used instead ofdistant://, which is the default RemoteLspProcessnow takes a second argument,scheme, which dictates whether to translatedistant://or something else
- CLI now offers the following new subcommands
distant fs copyis a refactoring ofdistant client action copydistant fs existsis a refactoring ofdistant client action existsdistant fs readis a refactoring ofdistant client action file-read,distant client action file-read-text, anddistant client action dir-readdistant fs renameis a refactoring ofdistant client action renamedistant fs writeis a refactoring ofdistant client action file-write,distant client action file-write-text,distant client action file-append,distant fs make-diris a refactoring ofdistant client action dir-createdistant fs metadatais a refactoring ofdistant client action metadatadistant fs removeis a refactoring ofdistant client action removedistant fs searchis a refactoring ofdistant client action searchdistant fs watchis a refactoring ofdistant client action watchdistant spawnis a refactoring ofdistant client action proc-spawnwithdistant client lspmerged in using the--lspflagdistant system-infois a refactoring ofdistant client action system-info
- Search now supports
upwardas a directional setting to traverse upward looking for results rather than recursing downward
- CLI subcommands refactored
distant client selectmoved todistant manager selectdistant client actionmoved todistant actiondistant client launchmoved todistant launchdistant client connectmoved todistant connectdistant client lspmoved todistant lspdistant client replmoved todistant apidistant client shellmoved todistant shell
distant-corecrate no longer offers theclapfeature
distant launch manager://localhostnow rejects a bind address ofsshas theSSH_CONNECTIONenvironment variable isn't available in most cases
0.20.0-alpha.4 - 2023-03-31
- Default configuration for
config.toml - Ability to generate default configuration using
distant generate config /path/to/config.toml --current-diroption fordistant client shellanddistant client lsp
- Updated a variety of dependencies to latest versions
0.20.0-alpha.3 - 2022-11-27
Frame::emptymethod as convenience forFrame::new(&[])ClientConfigto supportReconnectStrategyand a duration serving as the maximum time to wait between server activity before attempting to reconnect from the client- Server sends empty frames periodically to act as heartbeats to let the client know if the connection is still established
- Client now tracks length of time since last server activity and will attempt a reconnect if no activity beyond that point
Framemethodsreadandwriteno longer return anio::Result<...>and instead returnOption<Frame<...>>and nothing respectivelyFrame::readmethod now supports zero-size itemsClient::inmemory_spawnandUntypedClient::inmemory_spawnnow take aClientConfigas the second argument instead ofReconnectStrategy- Persist option now removed from
ProcSpawnmessage and CLI - Bump minimum Rust version to 1.64.0
--no-shelloption is removed as we automatically detect and use the PTY of the remote system using a default shell
0.20.0-alpha.2 - 2022-11-20
- New
ConnectionStateandConnectionWatcherto support watching changes to the client connection, supportingclone_connection_watcherandon_connection_changemethods for the client
- Server will now drop the connection if it receives an error (other than WouldBlock) while trying to read from the transport, rather than just logging the error, regardless of whether the error is resumable
0.20.0-alpha.1 - 2022-11-19
NOTE: This is incomplete as v0.20.0 is a near-complete rewrite internally.
- New
containsandortypes forSearchQueryCondition
SearchQueryConditionnow escapes regex for all types exceptregex- Removed
min_depthoption from search - Updated search to properly use binary detection, filter out common ignore
file patterns, and execute in parallel via the
ignorecrate andnum_cpuscrate to calculate thread count
- Resolution of
BindAddressnow properly handles hostnames ranging fromlocalhosttoexample.com - Parsing of
BindAddressno longer causes a stack overflow
0.19.0 - 2022-08-30
SystemInfovia ssh backend now detects and reports username and shellSystemInfovia ssh backend now reports os when windows detectedCapabilitiesrequest/response for server and manager that report back the capabilities (and descriptions) supported by the server or managerSearchandCancelSearchrequest/response for server that performs a search usinggrepcrate against paths or file contents, returning results back as a stream- New
Searcheravailable as part of distant client interface to support performing a search and getting back results - Updated
DistantChannelExtto support creating aSearcherand canceling an ongoing search query distant client action searchnow supported, waiting for results and printing them out
- New
SystemInfodata type now includes two additional fields:usernameandshell. Theusernamefield represents the name of the user running the server process. Theshellfield points to the default shell associated with the user running the server process
distant client shellwill now use the default shell from system info, or choose between/bin/shandcmd.exeas the default shell based on the family returned by a system info requestdistant client shellproperly terminates master pty when the shell exits, resolving the hanging that occurred for Windowscmd.exeandpowershell.exeupon exit- ssh launch with login shell now only uses
shwhen remote family isunix - ssh backend implementation of copy now works more widely across windows
systems by switching to
powershell.exeto perform copy
0.18.0 - 2022-08-18
shutdown-afterreplaced withshutdownthat supports three options:never- server will never shutdown automaticallyafter=N- server will shutdown after N secondslonely=N- server will shutdown N seconds after no connections
0.17.6 - 2022-08-18
shutdown-aftercli parameter and config option now properly shuts down server after N seconds with no connections
0.17.5 - 2022-08-18
- Handle
RecommendedWatcherfailing with an unsupported OS function on M1 Mac architecture running a Linux container via Docker (notify #423)
0.17.4 - 2022-08-18
- Parsing of a host for
Destinationnow correctly handles IPv6 addresses such that::1and[::1]:12345are captured into host and port - Displaying of
DistantandDistantSingleKeyCredentialsnow properly wrap IPv6 addresses in square brackets when a port is available
0.17.3 - 2022-08-18
- New
ClientConnectConfigto support connect settings, specifically for ssh HostwithHostParseErrorthat follows the DoD Internet Host Table Specification and subsequent RFC-1123
Destinationnow has direct fields for scheme, username, password, host, and port that are populated from parsingDestinationno longer wrapsuriparse::URIand all references to implementing/wrapping have been removed
sshoption to specify external binary not working onlaunchdue to the key being mis-labeled asssh.bindinstead ofssh.bin- All ssh settings were not being applied with manager handlers due to some key
checks being incorrect (e.g.
backendinstead ofssh.backend). This has now been corrected and settings now properly get applied
- The ssh settings of
ssh.userandssh.portwere unused as these were now being taking from the destinationssh://[username:]host[:port], so they have now been removed to avoid confusion - Remove
uriparsedependency
0.17.2 - 2022-08-16
replace_schememethod toDestination
DistantManagerRouterno longer silently fails whendistant.argsis provided that includes double quotes within it
Mapimplementation ofDisplaynow escapes\and"Mapimplementation ofFromStrnow handles escaped\and"- Split
fallback_schemeforDistantManagerConfigintolaunch_fallback_scheme(defaulting to ssh) andconnect_fallback_scheme(defaulting to distant); this means that subsequent use ofdistant client launch [user@]host[:port]will now default to ssh instead of failing due to lack of distant launch handler - Expose
windows-pipeandunix-socketconfig and cli options regardless of platform (so they can be provided without worrying about which OS) - Lock
--accesstodistant manager listenas a cli parameter and move it out of[network]config to be tied to manager config only
0.17.1 - 2022-08-16
- New
formatoption available forclient select- Choices are provided via
{"type": "select", "choices": ["...", ...], "current": 0} - Selection is specified via
{"type": "selected", "choice": 0}
- Choices are provided via
distant client launchusing--format jsonnow properly prints out id in JSON format ({"type": "launched", "id": "..."})distant client connectusing--format jsonnow properly prints out id in JSON format ({"type": "connected", "id": "..."})
0.17.0 - 2022-08-09
distant managersubcommanddistant manager servicesubcommand contains functionality to install, start, stop, and uninstall the manager as a service on various operating systemsdistant manager infowill print information about an active connectiondistant manager listwill print information about all connections
distant generatesubcommanddistant generate schemawill produce JSON schema for server request/responsedistant generate completionwill produce completion file for a specific shell
distant launchis nowdistant client launchdistant actionis nowdistant client actiondistant shellis nowdistant client shelldistant listenis nowdistant server listen- Minimum supported rust version (MSRV) has been bumped to
1.61.0
- Shell no longer has issues with fancier command prompts and other
terminal-oriented printing as
TERM=x256-coloris now set by default
- Networking directly from distant client to distant server. All connections are now facilitated by the manager interface with client -> manager -> server
- Environment variable output as part of launch is now gone as the connection is now being managed, so there is no need to export session information
0.16.4 - 2022-06-01
- Dockerfile using Alpine linux with a basic install of distant, tagged as
chipsenkbeil/distant:0.16.3andchipsenkbeil/distant:0.16.4
0.16.3 - 2022-05-29
- New
--ssh-backendoption for CLI that acceptslibsshorssh2for native backend ssh support distant_ssh2::SshBackendnow supports parsing from a&strand producing a&'static strfrom an instance
0.16.2 - 2022-05-27
- The following fields now default to false when missing in JSON request body
- For
DirRead:absolute,canonicalize,include_root - For
DirCreate:all - For
Remove:force - For
Watch:recursive - For
Metadata:canonicalizeandresolve_file_type - For
ProcSpawn:args(empty list),persist, andpty(nothing)
- For
0.16.1 - 2022-05-13
- Lock in to Rust openssl 0.10.38 as it is the last version that supports using openssl 3.x.x before reverting
0.16.0 - 2022-05-12
- New
environmentsession type that prints out environment variable definitions for use in an interactive session or to evaluate - Shell support introduced for ssh & distant servers, including a new shell command for distant cli
- Support for JSON communication of ssh auth during launch (cli)
- Add windows and unix metadata files to overall metadata response data
- Watch and unwatch cli commands powered by underlying
Watchercore implementation that uses newRequestData::Watch,RequestData::Unwatch, andResponseData::Changeddata types to communicate filesystem changes
- Default session type for CLI (launch, action, etc) is
environment - Replace cbor library with alternative as old cbor lib has been abandoned
- Refactor some request & response types to work with new cbor lib
- Updated cli to always include serde dependency
- Expose
origin_idof remote process as method - Rename ProcRun -> ProcSpawn, ProcStarted -> ProcSpawned
- Update ProcStdin, ProcStdout, and ProcStderr to use list of bytes instead
of a string as a parameter; RemoteProcess and RemoteLspProcess now support
reading and writing using either
StringorVec<u8> - Rename
--detachedand associated to--persist
- Github actions no longer use paths-filter so every PR & commit will test everything
distant-luaanddistant-lua-testno longer exist as we are focusing solely on the JSON API for integration into distant
0.15.1 - 2021-11-15
--key-from-stdinoption to listen cli command to read key from stdin instead of generating- More logging to distant and ssh handler proc run methods
- Disclaimer to distant session about dns resolution
- Improve the distant-core readme
- DNS resolution for ssh session
0.15.0 - 2021-10-16
- distant-ssh2 subcrate to provide an alternate session as an ssh client
- distant-lua subcrate for lua lib
rpassword&wezterm-sshdependencies for distant-ssh2 andXChaCha20Poly1305dependency in place oforionfor encryptionCodectrait to support encode & decodeXChaCha20Poly1305Codecthat encrypts/signs using XChaCha20Poly1305PlainCodecthat does no encrypting/signingSessionChannelExttrait for friendlier methodsMailboxand internalPostOfficeto manage responses to requests- Method parameter to support distant & ssh methods for action and lsp subcommands
- Support compiling distant cli on windows (#59)
statusmethod toRemoteProcess
- Refactor Transport to take generic Codec
- Rewrite to no longer use blake256
- Refactor
Sessionto use a newSessionChannelunderneath - Refactor
Responseto always include an origin_id field instead of being optional - Update
ProcStdout,ProcStderr, andProcDoneto include origin id - Replace
verboseoption withlog-level - Replace
DISTANT_AUTH_KEYwithDISTANT_KEYfor environment variable parsing - Refactor to support Minimum Supported Rust Version (MSRV) of 1.51.0
- Rename core -> distant-core in project directory structure
- Upgrade tokio to 1.12
- Update
Metadatato be- cloneable
- debuggable
- serializable
- deserializable
- Refactor
MetadataandSystemInforesponse data types to support subtypes as singular parameters - Replace
--daemonin favor of opposite parameter--foreground
DistantCodeck256dependencyTransport::from_handshakeas no longer doing EDCH key exchange
- 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
InmemoryStreamWriteHalfimplementation of AsyncWrite now properly yields pending upon full channel and no longer locks up- stdout, stderr, and stdin of
RemoteProcessno longer cause deadlock