-
-
Notifications
You must be signed in to change notification settings - Fork 955
Add support for Zlib compression (.NET 6.0 onward only) #1326
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
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
b219168
Integrate `ZLibStream` from .NET 6.0+ with SSH.NET.
scott-xu beafd82
OpenSSH server does not support zlib (pre-auth); OpenSSH client still…
scott-xu 37dc55c
Correct compression algorithm name; Update README.md
scott-xu 8fb67f7
Integrate `ZLibStream` from .NET 6.0+ with SSH.NET.
scott-xu 7762748
OpenSSH server does not support zlib (pre-auth); OpenSSH client still…
scott-xu e7cdd32
Correct compression algorithm name; Update README.md
scott-xu 684298c
Merge branch 'develop' into zlib
scott-xu bcd275f
Merge branch 'develop' into zlib
scott-xu 903e35c
Merge branch 'develop' into zlib
scott-xu 6a6503e
Merge branch 'zlib' of https://github.com/scott-xu/SSH.NET into zlib
scott-xu 38f7485
Merge branch 'sshnet:develop' into zlib
scott-xu a4c97b2
Merge branch 'zlib' of https://github.com/scott-xu/SSH.NET into zlib
scott-xu e7fcad3
Test the compression by upload/download file
scott-xu 29f502c
Refactor compression.
scott-xu e2b6975
Move delayed compression logic to base class.
scott-xu 3667296
seal Zlib
scott-xu cb98229
update unit test
scott-xu e7ff21e
update unit test to see if it can trigger integration test
scott-xu 7ebf78c
Flush zlibStream
scott-xu 16b0745
Fix integration test
scott-xu d5d74a1
update test
scott-xu 8243215
Merge branch 'develop' into zlib
scott-xu 8ef8583
Merge branch 'develop' of https://github.com/scott-xu/SSH.NET into zlib
scott-xu 722f507
Merge branch 'develop' into zlib
scott-xu 86ce319
Update ConnectionInfo.cs
scott-xu 77c475d
Update README.md
scott-xu acbb217
Merge branch 'develop' into zlib
scott-xu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,17 @@ | ||
using Renci.SshNet.Messages.Authentication; | ||
|
||
#if NET6_0_OR_GREATER | ||
namespace Renci.SshNet.Compression | ||
{ | ||
/// <summary> | ||
/// Represents "[email protected]" compression implementation. | ||
/// </summary> | ||
public class ZlibOpenSsh : Compressor | ||
internal sealed class ZlibOpenSsh : Zlib | ||
{ | ||
/// <summary> | ||
/// Gets algorithm name. | ||
/// </summary> | ||
public override string Name | ||
public ZlibOpenSsh() | ||
: base(delayedCompression: true) | ||
{ | ||
get { return "[email protected]"; } | ||
} | ||
|
||
/// <summary> | ||
/// Initializes the algorithm. | ||
/// </summary> | ||
/// <param name="session">The session.</param> | ||
public override void Init(Session session) | ||
{ | ||
base.Init(session); | ||
|
||
session.UserAuthenticationSuccessReceived += Session_UserAuthenticationSuccessReceived; | ||
} | ||
|
||
private void Session_UserAuthenticationSuccessReceived(object sender, MessageEventArgs<SuccessMessage> e) | ||
public override string Name | ||
{ | ||
IsActive = true; | ||
Session.UserAuthenticationSuccessReceived -= Session_UserAuthenticationSuccessReceived; | ||
get { return "[email protected]"; } | ||
} | ||
} | ||
} | ||
#endif |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.