Skip to content

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

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

Open
alphadon opened this issue Aug 8, 2022 · 8 comments
Open

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

alphadon opened this issue Aug 8, 2022 · 8 comments

Comments

@alphadon
Copy link

alphadon commented Aug 8, 2022

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.

@ravibpatel
Copy link
Owner

You can share your build on the support portal here.

@pAtMaN-bcassa
Copy link

@alphadon
Hey alphadon, our provider has blocked all access for FTP, we must now use SFTP and I would need your customized package if that is possible.

Greetings from Germany

@alphadon
Copy link
Author

alphadon commented Mar 1, 2023

@pAtMaN-bcassa, I have shared my source with @ravibpatel per the direction above. It is currently targeted at ,NET 6.0 which we are using for the project we needed it for, so I do not have an actual pull request prepared to merge it in as it could be a breaking change for others, or at minimum require some extra work to make SFTP support seamless for all supported environments.

Please PM me with your email address or a file share link and I can provide the code to you. The ZIP is about 1MB.

@ravibpatel
Copy link
Owner

@alphadon Can you share it again? I didn't get the email, or I missed it.

@alphadon
Copy link
Author

alphadon commented Mar 1, 2023

I've re-sent my contact info and another attempt at attaching the archive via User Voice support.

@pAtMaN-bcassa
Copy link

pAtMaN-bcassa commented Mar 2, 2023

@alphadon Thanks for the fast reply. I need this for older projects which were develpped in .NETFramework 4.7.2, but I think I can manage that. I don't knwo how to send a private message here so here is my private email address: xxxxxxxxxxxxx

@alphadon
Copy link
Author

alphadon commented Mar 3, 2023

@pAtMaN-bcassa, were you able to get a build and test it for your .NET Framework 4.7.2 needs? I did not have time or access to an SFTP server to fully test the updates, but I'd like to hear if you were successful or ran in to any issues. If you were able to get SFTP working, please contribute any additional improvements back to the project.

@pAtMaN-bcassa
Copy link

pAtMaN-bcassa commented Apr 3, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants