如何使用Qt/QNetworkAccessManager(C ++)实现SFTP [英] Howto implement SFTP with Qt/QNetworkAccessManager (C++)
问题描述
我是Qt的新手,我想为我的软件实现FTP和SFTP支持.当我用Google搜索时,我发现Qt不存在sftp库,但是QNetworkAccessManager应该可以.然后,我试图发现如何构建自定义协议或类似的协议,但没有弄清楚该怎么做.
I'm new to Qt and I would like to implement FTP and SFTP support for my software. As I googled I discovered that there doesn't exist a sftp library for Qt but it should be possible with QNetworkAccessManager. I tried then to discover on how to build a custom protocol or something like that but didn't figure out how to do it.
有人知道我该怎么做吗?
Does someone know how I could do that?
谢谢,迈克尔
推荐答案
Qt SDK不支持SFTP,但Qt Creator实现了SFTP.
There is no support for SFTP in Qt SDK but Qt Creator implements SFTP.
我隔离了包含SSH和SFTP的库,并在其中创建了一个名为 QSsh 的新项目.Github.该项目的目的是为任何Qt应用程序提供SSH和SFTP支持.
I have isolated the library that contains SSH and SFTP and I have created a new project named QSsh in Github. The aim of the project is to provide SSH and SFTP support for any Qt Application.
我已经写了一个有关如何使用SFTP上传文件的示例.看看 examples/SecureUploader/
I have written an example on how to upload a file using SFTP. Take a look at examples/SecureUploader/
我希望这会有所帮助
这篇关于如何使用Qt/QNetworkAccessManager(C ++)实现SFTP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!