We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
libssh2 是一个很棒的 SFTP 库 - 而且它也恰好是 (lib)curl 用于 SFTP 的库。
libssh2 is a great lib for SFTP - and it also happens to be the lib that (lib)curl uses for SFTP.
您是否看过libcurl 的替代页面?那里的一些选项可以提供 FTP 解决方案。
我认为如果您不再使用 libcurl,您可能需要使用两个不同的库,一个用于 SFTP(实际上只是 SSH),另一个用于 FTP。
但是,如果您不想这样做,也许您希望编译 libcurl 以链接到 cyaSSL 或 PolarSSL 而不是 openssl,以使安装更加轻量级。您还可以尝试使用最少的选项来编译它,因为您只需要 FTP 和 SFTP 支持。
希望这有帮助。
Have you looked at libcurl's alternatives page? A few options there may provide an FTP solution.
I think if you move away from libcurl, you may need to use two different libraries, one for SFTP (which is really just SSH) and one for FTP.
However, if you do not want to do this, perhaps you want to look at compiling libcurl to link against cyaSSL or PolarSSL instead of openssl to make the installation more lightweight. You could also try to compile it with minimal options, as you only need FTP and SFTP support.
Hope this helps.
您可以使用 libssh 进行 sftp。我在这里为您放置了一些具有暂停/恢复功能并且可以在 Windows 上运行的代码。对于linux,您需要替换本地文件处理函数。我无法复制整个课程,因为它将超出此网站的限制。将用户名、密码和主机名更改为 sftp 服务器的正确等效项:
you can use libssh for sftp. I put some code here for you which has Pause/Resume and works on windows. for linux you need to replace local file handling functions. I cannot copy the entire class because it will exceed this website limit. change username and password and hostname to proper equivalents of your sftp server: