Prepare Dosh 0.1.7 release
ci / test (push) Has been cancelled
ci / fuzz-smoke (push) Has been cancelled
ci / windows-client (push) Has been cancelled
ci / package-release (linux-x86_64, ubuntu-latest) (push) Has been cancelled
ci / package-release (macos-aarch64, macos-14) (push) Has been cancelled
ci / package-release (macos-x86_64, macos-13) (push) Has been cancelled
ci / package-release (windows-x86_64, windows-latest) (push) Has been cancelled
ci / remote-bench (push) Has been cancelled

This commit is contained in:
DuProcess
2026-07-01 18:03:42 -04:00
parent 3224a9c699
commit 431dcc3997
3 changed files with 54 additions and 118 deletions
Generated
+1 -1
View File
@@ -436,7 +436,7 @@ dependencies = [
[[package]]
name = "dosh"
version = "0.1.6"
version = "0.1.7"
dependencies = [
"anyhow",
"base64",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "dosh"
version = "0.1.6"
version = "0.1.7"
edition = "2024"
license = "MIT"
+52 -116
View File
@@ -1,33 +1,31 @@
# Dosh
Dosh is an encrypted remote terminal for fast reconnecting shells. It is meant
to replace Mosh and day-to-day interactive SSH sessions.
Dosh is an encrypted remote terminal for fast reconnecting shells.
It runs a `dosh-server` on the remote machine and a `dosh` client locally. The
first setup can use SSH. After that, Dosh can attach over encrypted UDP with
cached credentials, keep terminal sessions alive, reconnect after network
changes, and forward TCP ports.
It also includes native encrypted file copy over the Dosh stream layer.
It runs a `dosh-server` on a Unix-like host and a `dosh` client on macOS,
Linux, or Windows. Setup can use SSH, then Dosh connects over encrypted UDP,
keeps sessions alive across disconnects, supports terminal apps, and can carry
TCP forwarding, file copy, and VS Code Remote-SSH streams.
## Support
- Client: macOS, Linux, Windows
- Server: Unix-like systems with PTYs
- Server: Linux and other Unix-like systems with PTYs
- Default UDP port: `50000`
- Windows: client only
- UDP port: one configured server port, default `50000`
Dosh does not implement SFTP, X11 forwarding, or a Windows server. Windows is
client-only.
Dosh is meant to replace Mosh and everyday interactive SSH sessions. It does
not currently include SFTP, X11 forwarding, or a Windows server.
## Install
Server and client on Unix/macOS:
Unix/macOS server and client:
```sh
curl -fsSL https://git.palav.dev/Palav/dosh/raw/branch/main/install.sh | sh -s -- both --repo https://git.palav.dev/Palav/dosh.git --port 50000
```
Client only on Unix/macOS:
Unix/macOS client only:
```sh
curl -fsSL https://git.palav.dev/Palav/dosh/raw/branch/main/install.sh | sh -s -- client --repo https://git.palav.dev/Palav/dosh.git
@@ -39,123 +37,48 @@ Windows client:
irm https://git.palav.dev/Palav/dosh/raw/branch/main/install.ps1 | iex
```
## Commands
## Use
```sh
dosh setup HOST # import SSH config and trust the Dosh host key
dosh HOST # connect
dosh HOST COMMAND # connect and run a command
dosh exec HOST COMMAND # run a non-interactive remote command
dosh cp SRC DST # copy files; use host:path for a remote side
dosh ls host:path # list a remote path
dosh cat host:path # print a remote file
dosh mkdir host:path # create a remote directory
dosh rm [-r] host:path # remove a remote file or directory
dosh update # update Dosh
dosh status HOST # show remote tmux sessions and Dosh service status
dosh restart HOST # restart dosh-server and show service status
dosh doctor HOST # check config and connectivity
dosh recover HOST # clear cached attach state and re-check
dosh proxy-stdio HOST 127.0.0.1 22
dosh vscode HOST [PATH] # configure/open VS Code Remote-SSH through Dosh
dosh setup HOST
dosh HOST
dosh HOST COMMAND
dosh update
```
Examples:
Useful commands:
```sh
dosh server
dosh server tm
dosh exec server 'uname -a'
dosh cp file.txt server:tmp/file.txt
dosh cp -r server:Projects/app ./app
dosh cp -r server:Projects/app backup:app
dosh ls server:Projects
dosh cat server:tmp/file.txt
dosh forward server -L 8080:127.0.0.1:80
dosh forward server -D 1080
dosh forward server -R 2222:127.0.0.1:22
dosh proxy-stdio server 127.0.0.1 22
dosh vscode server /home/me/project
dosh exec HOST COMMAND
dosh cp SRC DST
dosh ls host:path
dosh cat host:path
dosh mkdir host:path
dosh rm [-r] host:path
dosh forward HOST -L 8080:127.0.0.1:80
dosh forward HOST -D 1080
dosh forward HOST -R 2222:127.0.0.1:22
dosh status HOST
dosh doctor HOST
dosh recover HOST
dosh restart HOST
```
Agent forwarding is opt-in with `-A` and must be enabled on the server.
File copy is enabled by `allow_file_transfer = true` on the server.
Agent forwarding is opt-in with `-A` and must also be enabled on the server.
File copy must be enabled by the server config.
## VS Code
Dosh can carry VS Code Remote-SSH without replacing VS Code's SSH workflow.
Dosh can carry VS Code Remote-SSH through its transport:
```sh
dosh vscode setup server
dosh vscode server /home/me/project
dosh vscode setup HOST
dosh vscode HOST /remote/path
```
This writes a managed SSH config entry using:
```sshconfig
ProxyCommand dosh proxy-stdio server %h %p
```
VS Code still uses Remote-SSH and the normal remote VS Code Server. Dosh carries
the SSH byte stream over its encrypted reconnecting transport.
The optional extension in `vscode-extension/` provides the same setup from the
Command Palette.
## Library
Dosh can also be used as a Rust transport for application protocols that need
encrypted streams, roaming, reconnect behavior, keepalives, retransmission,
flow control, and in-order delivery.
Use `dosh::client::DoshClient` and `dosh::server::DoshServer` for the complete
native-auth path. Use `dosh::transport::DoshTransport` or `StreamMux` only when
you already have your own session/auth layer.
Client-side SDK:
```rust
let client = dosh::client::DoshClient::load()?;
let mut dosh = client
.connect("server")
.service("myapp")
.connect()
.await?
.into_transport();
let stream = dosh.open_service("myapp").await?;
dosh.send(stream, b"hello").await?;
```
Server-side SDK:
```rust
let config = dosh::server::DoshServerConfig::default()
.service("myapp")?;
let mut server = dosh::server::DoshServer::bind(config).await?;
loop {
match server.recv().await? {
dosh::server::DoshServerEvent::Accepted(client) => {
eprintln!("accepted {:?}", client.conn_id);
}
dosh::server::DoshServerEvent::Session { conn_id, event } => {
if let dosh::transport::SessionEvent::Stream(
dosh::transport::TransportEvent::Open(open)
) = event {
server.accept_stream(conn_id, open.stream_id).await?;
}
}
dosh::server::DoshServerEvent::Ignored => {}
}
}
```
The server runtime owns UDP reads and demuxes packets by connection id, so
multiple clients can share one Dosh port without per-session readers racing.
Runnable SDK examples live in `examples/sdk_echo_server.rs` and
`examples/sdk_echo_client.rs`.
This creates a managed SSH config entry using `ProxyCommand dosh proxy-stdio`.
VS Code still uses Remote-SSH and its normal remote server; Dosh carries the
SSH byte stream.
## Config
@@ -169,8 +92,21 @@ Common client settings:
```toml
default_session = "new"
auth_preference = "native,ssh"
predict = true
cache_attach_tickets = true
disconnect_status = true
```
## Rust Library
Dosh exposes a Rust transport for encrypted, reconnecting application streams.
Use `dosh::client::DoshClient` and `dosh::server::DoshServer` for the normal
native-auth path. Use `dosh::transport::DoshTransport` only when you already
own session setup and authentication.
Runnable examples:
```text
examples/sdk_echo_client.rs
examples/sdk_echo_server.rs
```