【问题标题】:wget - download file from ftp server (with auth) via http proxy (with auth)wget - 通过 http 代理(使用授权)从 ftp 服务器(使用授权)下载文件
【发布时间】:2019-09-16 17:00:09
【问题描述】:

我想使用 wget 从 ftp 下载整个文件夹(我知道 -r),curl 不允许在一个请求中下载文件夹。我有以下用于 curl 工作的语法,但 无法计算出甚至通过 wget 下载单个文件的语法这里的关键是 ftp 具有身份验证功能,并且通过 http 代理(使用 diff 凭据)访问 ftp

这是有效的 curl 命令: curl --proxy-anyauth --proxy-user NTADMIN\proxyuser:proxypass --proxy http://httpproxyhost:8080 --anyauth -u ftpuser:ftppass -v 'ftp://ftphost/file'

wget 中的等价物是什么?

【问题讨论】:

    标签: http curl proxy ftp wget


    【解决方案1】:

    您可以尝试使用规范的 URI 格式:

    curl --proxy http://proxyuser:proxypass@httpproxyhost:8080 -v 'ftp://ftpuser:ftppass@ftphost/file'
    

    使用 wget 你可以使用这样的命令:

    ftp_proxy=http://proxyuser:proxypass@httpproxyhost:8080 wget ftp://ftpuser:ftppass@ftphost/file
    

    【讨论】:

    • 不起作用,卡在 Connecting to ftphost... 永远
    • 已发送代理请求,等待响应... 407 需要代理身份验证
    • 对我来说,代理身份验证似乎在这种情况下不起作用。您是否检查过代理的用户名/密码?如果您可以使用 curl 做到这一点,为什么还要搜索 wget
    • 用户名/密码是正确的,因为 curl 接受它们,如果我给 curl 错误的密码,那么 curl 不起作用。我搜索 wget 的原因是它有 -r 选项来下载递归文件夹,但 curl 没有
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-08-27
    • 2015-02-10
    • 1970-01-01
    • 2012-04-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多