cURL / Mailing Lists / curl-users / Single Mail

curl-users

回复: Re: 回复: Re: Curl can't work well over FTP protocol via socks5 proxy

From: 峰 涂 <tu0151034_at_yahoo.com.cn>
Date: Mon, 11 Jun 2007 18:03:07 +0800 (CST)

Hi ,Dan. I have tried about 10 other socks5 proxies and you could get them by google. There existed many free scoks5 proxies.
  And my command line for testing one of these socks5 proxies is as followings:
   
  $ curl -v ftp://ftp.oreilly.com/ --socks5 71.128.7.155:43887
   
  I got:
  ==========================================================
  
* About to connect() to proxy 71.128.7.155 port 43887 (#0)
* Trying 71.128.7.155... Connection refused
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host
[root@wks230573wss src]# ./curl -v ftp://ftp.oreilly.com/ --socks5 71.128.7.155:43887
* About to connect() to proxy 71.128.7.155 port 43887 (#0)
* Trying 71.128.7.155... connected
* Connected to 71.128.7.155 (71.128.7.155) port 43887 (#0)
* FTP 0x8c0a1f8 state change from STOP to WAIT220
< 220 ProFTPD 1.2.10 Server (ftp.oreilly.com) [172.31.173.9]
> USER anonymous
* FTP 0x8c0a1f8 state change from WAIT220 to USER
< 331 Anonymous login ok, send your complete email address as your password.
> PASS ftp_at_example.com
* FTP 0x8c0a1f8 state change from USER to PASS
< 230-Welcome to the O'Reilly & Associates, Inc. FTP Archive.
< Local date and time: Mon Jun 11 05:52:14 2007
< 230 Anonymous access granted, restrictions apply.
> PWD
* FTP 0x8c0a1f8 state change from PASS to PWD
< 257 "/" is current directory.
* Entry path is '/'
* FTP 0x8c0a1f8 state change from PWD to STOP
* protocol connect phase DONE
* DO phase starts
> EPSV
* FTP 0x8c0a1f8 state change from STOP to PASV
* Connect data stream passively
< 229 Entering Extended Passive Mode (|||40980|)
* Trying 71.128.7.155... connected
* Connecting to 71.128.7.155 (71.128.7.155) port 43887
* Can't complete SOCKS5 connection to 0.0.0.0:0. (1)
* FTP 0x8c0a1f8 state change from PASV to STOP
* DO phase is complete
* Closing connection #0
curl: (7) Can't complete SOCKS5 connection to 0.0.0.0:0. (1)
  ==========================================================
  Finally these free socks proxy might change daily. So if you want to verify these tests, you perhaps search them again by google.
   
  Thank in advance
  Feng Tu
  
Daniel Stenberg <daniel_at_haxx.se> 写道:
  On Mon, 11 Jun 2007, 峰 涂 wrote:

> I have analyzed the aforementioned two courses . I found that when running
> script "test707", the port of FTP command connection( first phase ) was
> identical to that of FTP data connection( second phase ) --- that was 9000.
> I think that it may be where the problem lies. Because via real socks
> proxy, the port of data connection is different from that of command
> connection.

Can you please elaborate on this, as I don't follow.

The socks test cases do use "real socks". I'm not sure what makes your
situation more real than the test cases. The test case actually does FTP
transfers over a socks proxy.

The socks proxy is listening on a single port number, isn't it? So the second
connection to the ftp server still needs to connect to the same socks proxy
port number, right?

Can you perhaps provide a full --trace-ascii dump and your complete curl
command line with the socks proxy you use? (edit out sensitive data if there's
any)

-- 
Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
       
---------------------------------
 雅虎免费邮箱3.5G容量,20M附件!
Received on 2007-06-11