-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add proper version negotiation (#109)
Until now, the version was strictly checked against the software version. Now that the project gains in popularity and that a spec is coming, other people may try implementing the protocol. This adds a version negotiation mechanism that is still quite strict. - Add the concept of protocol experimental spec version, this currently implements the alpha-00 experimental spec version. - Do not check the software version during the negotiation, except for versions before alpha-00, where the implementation name then MUST be francoismichel/ssh3 - Right now, the server supports clients with version alpha-00 and older, i.e. clients with implementation name francoismichel/ssh3 and software version between 0.1.4 (included) and 0.1.5 (included) - Future clients implementing future draft versions will have to adapt their version to the server version. If the server does not support the client version, the client has to retry a new connection with a version that matches the server's version. A message should be displayed to the user, ensuring that the user knows that they should update the server version. Such a message will disappear with stable versions of the protocol. * add version negotiation * server: log client version when debug enabled * client: try request with matching version upon firstversion mismatch * better logging about version negotiation and conversation establishment * update go.mod * add integration tests for backwards compatibility
- Loading branch information
1 parent
7495fc2
commit 53d7264
Showing
7 changed files
with
393 additions
and
60 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.