curl http通过代理服务器连接到ftp URL

时间:2013-10-29 08:29:28

标签: linux curl ftp http-proxy

我正在尝试通过http代理执行ftp。我读到它可以通过使用http连接方法来实现。

所以我从命令行运行了curl命令。

curl -X CONNECT --url 'ftp://ftp.kernel.org:21' -x http ://proxy_server.com:80

这是我得到的输出

curl -v -X CONNECT ftp ://ftp.kernel.org:21 -x http ://proxy_server.com:80
* About to connect() to proxy proxy_server.com port 80 (#0)
*   Trying 100.173.137.101... connected
* Connected to proxy_server.com (100.173.137.101) port 80 (#0)
> CONNECT ftp://ftp.kernel.org:21 HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0     zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: ftp.kernel.org:21
> Accept: */*
> Proxy-Connection: Keep-Alive
> 
* HTTP 1.0, assume close after body
< HTTP/1.0 200 Connection established
< 
220 Welcome to kernel.org

但是当我在此之后输入命令'user anonymous'或甚至'help'命令时,我得不到服务器的响应。

如何使这项工作?

0 个答案:

没有答案
相关问题