-
-
Notifications
You must be signed in to change notification settings - Fork 931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Zlib compression (.NET 6.0 onward only) #1326
Conversation
… supports zlib (pre-auth)
… supports zlib (pre-auth)
With this PR, SSH.NET targeted to frameworks below .NET 6.0 can easily use 3rd party library to do the compression. For example: https://github.com/scott-xu/SSH.NET.Ionic.Zlib/blob/main/src/SshNet.IonicZlib/ZLib.cs |
The decompression works when receive SSH_MSG_GLOBAL_REQUEST. |
Ready to review @Rob-Hague @WojciechNagorski |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Is there a reason for not testing "zlib" as well?
Because sshd doesn't support "zlib"(pre-auth) anymore. |
ZLibStream
from .NET 6.0+ with SSH.NET.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, in that case I suggest we do not support the "zlib" algorithm since we can't test it easily. What do you think?
This is good to go otherwise.
Co-authored-by: Rob Hague <[email protected]>
Thanks, this is good to merge. |
@WojciechNagorski Is there any other thing I can do to get this merged? Thanks! |
Yes. You can ask @Rob-Hague for review. I do not have time now. |
I've added @Rob-Hague to code owners. |
Perfect! |
This PR adds support for [email protected] described in https://www.openssh.com/txt/draft-miller-secsh-compression-delayed-00.txt
Resolves #1130
Resolves #559
Resolves #336
Resolves #119
Notes:
This PR only adds compression support for .NET 6.0+.
"none" is the first and preferred compression method which means no compression by default, just like ssh_config:
The description of ssh -C option explains the reason:
zlib (pre-auth) is not supported in OpenSSH server (sshd) but is listed in OpenSSH client (ssh).
Since it is not easy to do integration-test for zlib (pre-auth), this PR does not add zlib (pre-auth).