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 17:21:37 +0800 (CST)

Hi ,Dan ,thank you very much for your reply.
  My complete command line is as followings:
  $ curl -v ftp://tf:1983026@10.132.140.23/ --socks5 10.132.140.229:1081 --trace-ascii trace.log
   
  The content of file "trace.log" is as followings:
  ===========================================================
   == Info: About to connect() to proxy 10.132.140.229 port 1081 (#0)
 == Info: Trying 10.132.140.229... == Info: connected
 == Info: Connected to 10.132.140.229 (10.132.140.229) port 1081 (#0)
 == Info: FTP 0x9494270 state change from STOP to WAIT220
 <= Recv header, 63 bytes (0x3f)
 0000: 220---------- Welcome to Pure-FTPd ----------
 <= Recv header, 42 bytes (0x2a)
 0000: 220-You are user number 1 of 30 allowed.
 <= Recv header, 47 bytes (0x2f)
 0000: 220-Local time is now 16:27. Server port: 21.
 <= Recv header, 51 bytes (0x33)
 0000: 220-This is a private system - No anonymous login
 <= Recv header, 62 bytes (0x3e)
 0000: 220 You will be disconnected after 15 minutes of inactivity.
 => Send header, 9 bytes (0x9)
 0000: USER tf
 == Info: FTP 0x9494270 state change from WAIT220 to USER
 <= Recv header, 35 bytes (0x23)
 0000: 331 User tf OK. Password required
 => Send header, 15 bytes (0xf)
 0000: PASS 19830226
 == Info: FTP 0x9494270 state change from USER to PASS
 <= Recv header, 53 bytes (0x35)
 0000: 230-User tf has group access to: gport wheel
 <= Recv header, 43 bytes (0x2b)
 0000: 230 OK. Current restricted directory is /
 => Send header, 5 bytes (0x5)
 0000: PWD
 == Info: FTP 0x9494270 state change from PASS to PWD
 <= Recv header, 34 bytes (0x22)
 0000: 257 "/" is your current location
 == Info: Entry path is '/'
 == Info: FTP 0x9494270 state change from PWD to STOP
 == Info: protocol connect phase DONE
 == Info: DO phase starts
 => Send header, 6 bytes (0x6)
 0000: EPSV
 == Info: FTP 0x9494270 state change from STOP to PASV
 == Info: Connect data stream passively
 <= Recv header, 42 bytes (0x2a)
 0000: 229 Extended Passive mode OK (|||38424|)
 == Info: Trying 10.132.140.229... == Info: connected
 == Info: Connecting to 10.132.140.229 (10.132.140.229) port 1081
 == Info: Can't complete SOCKS5 connection to 9.140.140.229:38424. (1)
 == Info: FTP 0x9494270 state change from PASV to STOP
 == Info: DO phase is complete
 == Info: Closing connection #0

  ===========================================================

  In addtion, my socks proxy was established by CCproxy. And other FTP tools ( like FileZilla, CuteFTP7 ) could successfully connect to aforementioned FTP server (10.132.140.23) via my socks5 proxy.
   
  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