首页 > 解决方案 > wget - download file from ftp server (with auth) via http proxy (with auth)

问题描述

I want to use wget to download a whole folder from ftp (i know about -r), curl does not allow downloading folder in one request. I have the following syntax for curl working but can't work out the syntax for even downloading a single file via wget. The key things here are that ftp has auth and getting to ftp is via http proxy (with diff credentials).

This is the working curl command: curl --proxy-anyauth --proxy-user NTADMIN\proxyuser:proxypass --proxy http://httpproxyhost:8080 --anyauth -u ftpuser:ftppass -v 'ftp://ftphost/file'

What is the equivalent in wget?

标签: httpcurlproxyftpwget

解决方案


您可以尝试使用规范的 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

推荐阅读