使用 Qt 安全上传文件

发布于 2024-10-16 02:18:29 字数 455 浏览 5 评论 0原文

我正在创建一个实用程序来备份用户的媒体文件。媒体不被共享等,它只是一个备份实用程序。

我正在尝试寻找最好的方法来保护用户免受 ISP 指控他们通过使用某种安全连接下载非法媒体文件的影响。

该实用程序是使用 Qt 库用 C++ 编写的,到目前为止我只能找到用于安全连接的 QtSslSocket 组件。该域已拥有未来几年有效的 SSL 证书。

任何人都可以建议从服务器端和客户端实现这一点的最佳方法。即服务器需要具备什么?备份实用程序需要从客户端实施什么特别的措施来确保交易安全?

是否有任何已知的、稳定的 sftp 或 ftps 服务器可用等?

据我所知,Qt 不支持安全 FTP 传输。 不确定还有什么其他信息。使问题更加清晰将会很有用,但任何为我指明正确方向的建议或帮助都将受到欢迎。

编辑 我也精通 Java,所以 Java 解决方案也可以工作......

I'm in the process of creating a utility to backup user's media files. The media isn't being shared etc its only a backup utility.

I'm trying to think of the best way to protect users from ISPs accusing them of downloading illegal media files by using some sort of secure connection.

The utility is written in C++ using the Qt lib and so far I've only been able to find the QtSslSocket component for secure connections. The domain already has a valid SSL certificate for the next few years.

Can anyone suggest the best way to go about implementing this from both the server and client side. i.e what does the server need to have in place and is there anything in particular the backup utility needs to implement from the client side to ensure secure transactions?

Are there any known, stable sftp or ftps servers available etc?

As far as I know, Qt doesn't have support for secure FTP transfers.
Not sure what other info. would be useful to make the question any clearer but any advice or help pointing me in the right direction will be most welcomed.

EDIT I'm also Java competent so a Java solution will work just as well...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

趁年轻赶紧闹 2024-10-23 02:18:29

正如马丁所写,你可以包装客户端。但如果您不想这样做,可以使用 libssh

As Martin wrote, you can wrap client. But if you don't want to do that, you can use libssh.

层林尽染 2024-10-23 02:18:29

我花了几天时间寻找某种解决方案,然后忘记了这个问题。然后今天我在 Qt-Creator 源代码中偶然发现了这个小宝石 Utils::ssh,包括对 SFTP、普通 SSH 和各种好东西的支持。

从 Qt-Creator 中解开一些东西可能会很痛苦,但是经历了这个过程就相当于获取了 Botan(QT-Creator 中的其他库之一)+ Utils。

当下雨的时候,倾盆大雨,我在一小时内找到了解决这个问题的两个解决方案 - http://nullget.sourceforge.net/ (需要中文翻译),但从他们的总结来看:

NullGet是用Qt编写的,运行于
多平台、GUI界面
多线程多协议
HTTP 下载软件。使用 NullGet
可以轻松下载各种
网络协议数据流,速度更快
下载速度,支持 HTTP,
目前支持的协议有:
HTTP、HTTPS、FTP、彩信、RTSP。还有它
可以运行在当前最流行的
操作系统包括Windows,
Linux、FreeBSD 等。

I searched for some sort of solution to this for a couple days and then forgot about the problem. Then today I stumbled across this little gem in the Qt-Creator source Utils::ssh, includes support for SFTP, plain-old SSH, and all sorts of goodies.

Disentangling stuff from Qt-Creator can be a pain, but having gone through this process it amounts to grabbing Botan (one of the other libs in QT-Creator) + Utils.

When it rains, it pours, I find two solutions to this problem in an hour - http://nullget.sourceforge.net/ (Requires Chinese translation), but from their summary:

NullGet is written with Qt, runs on
multiple platforms, the GUI interface
of the multi-threaded multi-protocol
HTTP download software. Use NullGet
can easily download a variety of
network protocol data stream, faster
download speeds, support for HTTP, the
protocol currently supported are:
HTTP, HTTPS, FTP, MMS, RTSP. And it
can run on most current popular
operating systems including Windows,
Linux, FreeBSD and so on.

泛滥成性 2024-10-23 02:18:29

最简单的方法是将 命令行 sftp 客户端 包装为一个 Qt 前端。

在服务器上,任何 ftp 服务器都应该可以开箱即用地执行 sftp。

Easiest way would be to just wrap a commandline sftp client with a Qt front end.

On the server any ftp server should do sftp pretty much out of the box.

九八野马 2024-10-23 02:18:29

正如 Synthesizerpatel 所说,Qt Creator 实现了 SFTP。因此,我隔离了包含 SSH 和 SFTP 的库,并在 Github 中创建了一个名为 QSsh 的新项目( https://github.com/lvklabs/QSsh)。该项目的目标是为任何 Qt 应用程序提供 SSH 和 SFTP 支持。

我在 examples/SecureUploader/ 中编写了一个有关如何使用 SFTP 上传文件的示例,

希望对您有所帮助

As Synthesizerpatel says Qt Creator implements SFTP. So I have isolated the library that contains SSH and SFTP and I have created a new project named QSsh in Github (https://github.com/lvklabs/QSsh). The aim of the project is to provide SSH and SFTP support for any Qt Application.

I have written an example on how to upload a file using SFTP in examples/SecureUploader/

I hope it might be helpful

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文