cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: SOCKS4 proxy and multi interface

From: Dmitri Shubin <sbn_at_tbricks.com>
Date: Thu, 21 Apr 2011 15:50:40 +0400

Dan Fandrich wrote:
> On Wed, Apr 20, 2011 at 08:44:59PM +0400, Dmitri Shubin wrote:
>
>> I have a problem downloading file with FTP protocol using SOCKS4 proxy.
>> It perfectly works with easy interface but fails when using multi one.
>>
>
> KNOWN_BUG #65 affects FTP over SOCKS, but the issue describes problems
> on the data channel only. Is the issue you're seeing on the control
> channel only? It sounds like it's happening well before the data
> channel is ever established.
>
OOPS, didn't checked this list first.
Yes, AFAIU even control channel is unable to login to FTP.

BTW I have a server that once per day tries to download several files
from FTP via SOCKS4 proxy and strangely enough sometimes it's able to
download them! Probably it happens when connection from the previous
download attempt wasn't closed.

In my case this simple patch fixed the problem, but I'm pretty sure it
breaks something else :)
(here I removed call to Curl_connected_proxy() from multi_runsingle())

--- curl-7.21.5/lib/multi.c 2011-04-05 19:07:27.000000000 +0400
+++ curl-7.21.5.new/lib/multi.c 2011-04-21 14:35:54.000000000 +0400
@@ -1142,7 +1142,7 @@
                                        &connected);
       if(connected) {
         /* see if we need to do any proxy magic first once we connected */
- easy->result = Curl_connected_proxy(easy->easy_conn);
+ /*easy->result = Curl_connected_proxy(easy->easy_conn);*/
 
         if(!easy->result)
           /* if everything is still fine we do the protocol-specific
connect

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-04-21