Enable connections via a proxy#112
Conversation
dd4d781 to
5933393
Compare
There was a problem hiding this comment.
Pull request overview
This PR implements SSH proxy jumping functionality, allowing connections to remote hosts via an existing SSH connection. This is useful for accessing hosts that are only reachable through an intermediate SSH server.
Changes:
- Added
connect_viaandconnect_via_with_configmethods to enable proxy jumping - Added test infrastructure (second SSH server container) to validate the proxy jumping feature
- Added test case to verify proxy jumping works correctly
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/client.rs | Implements connect_via and connect_via_with_config methods for proxy jumping, plus test case |
| tests/docker-compose.yml | Adds second SSH server container (ssh-server-2) for proxy jumping tests |
| tests/async-ssh2-tokio/Dockerfile | Adds environment variables for second SSH server configuration |
| .env | Adds environment variables for second SSH server IP and port |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /// Open a connection to a remote host via an existing connection. Can be | ||
| /// used for Proxy Jumping to hosts that are only accessible from a | ||
| /// different remote host. |
There was a problem hiding this comment.
Consider adding more comprehensive documentation for this new public API method, similar to the documentation for the connect method. The documentation should explain what happens when addr yields multiple addresses, how authentication works, and describe the parameters in detail. This would help users understand the proxy jumping feature better.
5933393 to
b0dfe14
Compare
b0dfe14 to
ed33c70
Compare
This PR adds functionality for SSH'ing to a remote host via an SSH proxy.
I implemented this feature for my own project, happy to discuss changing any details if you're interested in merging it.