Skip to content

I've added SFTP support via SSH.NET to this project #559

Open
@alphadon

Description

@alphadon

With minimal refactoring of the handling of the downloads, I've added the ability to use SFTP to retrieve the XML configuration and download file (MSI file in my case) from a Secure FTP server. My build takes a dependency on SSH.NET and has logging integrated as well (NLog) to assist in debugging during development.

A few things would need attention before considering this a complete enhancement:

  • Because there is not a true HTTP(S) webserver involved, we did not create or require release notes. Since the current implementation expects to get the release notes over HTTP, release notes cannot be retrieved and viewed directly from the SFTP server. Technically, if you do need release notes and have the ability to publish them at a different HTTP(S) location, this functionality would still work, but ideally, there should be support for markdown or some other simple text file format that serves the same purpose but does not need a full web server to deliver the release notes.
  • Additional interfaces and other infrastructure should be used to make the source of updates and release note content more "pluggable". My implementation does not contain the ability to create a new plug-in / provider for these, but it's not impossible. As it stands, one would need to take the dependency on SSH.NET, even if they only intended to use HTTP(S).
  • NLog entries require the dependency NLog, along with the configuration file. This could be more generic to enable a developer to choose any logging framework/provider they desire. I use NLog, so I didn't make it generic in my build.

Possibly other issues exist that I'm forgetting here... I can tell you that this works perfectly (asynchronously) via SFTP to run updates in a .NET 6.0 Windows Desktop (WinForms) application.

@ravibpatel, I'd be happy to share my build with you privately if you have an interest in resolving the issues above, including extending the product to accept different providers for HTTP(S), SFTP, Azure Blob, S3, etc. sources. These would likely need to be in the form of an extension module that allows a developer to only install the support needed for their implementation, without taking an unnecessary dependency on other infrastructure.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions