Repository navigation
feat: add sftp, port forwarding and jump hosts - #3
Merged
Merged
Conversation
`SshSession.open_sftp()` returns an `SftpClient` with list, stat, realpath, mkdir, rename, remove_file and remove_dir, plus chunked upload and download. Transfers stream in 256 KiB pieces, report progress at most ten times a second, honour a cancel token, and stage through `<path>.part` so an interrupted transfer never leaves a truncated file at the destination. `start_local_forward` binds on the device and opens a direct-tcpip channel per connection; `start_remote_forward` requests a server listener and pumps each forwarded-tcpip channel to a device destination. Both return a handle whose `stop()` closes the listener and its connections, and report per-connection failures through a `ForwardSink`. `SshSession.connect_via` runs SSH over a direct-tcpip channel of an authenticated session, so chains of bastions compose. The new categories NotFound, PermissionDenied, Cancelled, Forwarding and LocalIo join the stable error union, and the Kotlin, Swift and TypeScript layers expose all of it. The integration fixtures gain an http role, a bastion and a target container on a private network, and a forwarded-tcpip port.
…sinks `ForwardStartRecord` now assigns its fields instead of using the memberwise initializer, matching `ExecOutputRecord`. The SFTP entry mapping moved next to the record, so `SftpEntryRecord` keeps the synthesized initializers Expo needs, and the progress and forward sinks are public classes with public conforming methods.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds file transfer, port forwarding and jump hosts to the SSH session.
Verified: Rust unit tests and the container suites (SFTP paths, a 50 MB round trip with matching checksums and monotonic progress, cancellation, local and remote forwards, two- and three-hop bastion chains). On an Android emulator, the example lists a remote directory, downloads a file into the app sandbox and fetches through a local forward. The macOS CI job verifies the iOS build.