Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds OpenSSH ping@openssh.com transport-level ping/pong support to sshlib, exposing a new SshClient.ping() API and wiring the underlying protocol handling into the SSH connection state machine.
Changes:
- Added SSH ping/pong protocol message definitions, enum values, and a public
PingResultAPI. - Implemented client-side EXT_INFO advertisement, ping/pong handling, and rekey-time ping queuing in
SshConnection. - Added unit, fake-server, and real OpenSSH integration tests for ping/pong behavior.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
sshlib/src/test/kotlin/org/connectbot/sshlib/PingPongMessageTest.kt |
Adds round-trip serialization tests for ping/pong message bodies. |
sshlib/src/test/kotlin/org/connectbot/sshlib/client/SshClientIntegrationTest.kt |
Adds real-server integration coverage for SshClient.ping(). |
sshlib/src/test/kotlin/org/connectbot/sshlib/client/PingConnectionTest.kt |
Adds connection-level tests for ping support, pong replies, and rekey behavior. |
sshlib/src/test/kotlin/org/connectbot/sshlib/client/FakeSshServer.kt |
Extends the fake SSH server with EXT_INFO, ping/pong, and rekey test support. |
sshlib/src/main/kotlin/org/connectbot/sshlib/SshClient.kt |
Adds the public suspend ping() API on SshClient. |
sshlib/src/main/kotlin/org/connectbot/sshlib/protocol/SshClientStateMachine.kt |
Sends client EXT_INFO after initial NEWKEYS in the state machine flow. |
sshlib/src/main/kotlin/org/connectbot/sshlib/PingResult.kt |
Introduces the sealed result type returned by SshClient.ping(). |
sshlib/src/main/kotlin/org/connectbot/sshlib/client/SshConnection.kt |
Implements ping capability negotiation, ping/pong handling, and queued sends during rekey. |
sshlib/api.txt |
Updates the public API snapshot for PingResult and SshClient.ping(). |
protocol/src/main/resources/kaitai/ssh_msg_pong.ksy |
Defines the Kaitai schema for SSH pong payloads. |
protocol/src/main/resources/kaitai/ssh_msg_ping.ksy |
Defines the Kaitai schema for SSH ping payloads. |
protocol/src/main/resources/kaitai/ssh_enums.ksy |
Adds enum values for SSH_MSG_PING and SSH_MSG_PONG. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Adds support for OpenSSH ping/pong support in the protocol handler. Also adds a ping() method that sends SSH_MSG_PING and awaits SSH_MSG_PONG, queuing pings during active rekey and flushing them in rekeyComplete(). This can be used for measuring latency to the server.
Adds support for OpenSSH ping/pong support in the protocol handler. Also adds a ping() method that sends SSH_MSG_PING and awaits SSH_MSG_PONG, queuing pings during active rekey and flushing them in rekeyComplete(). This can be used for measuring latency to the server.