cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: no custom read() write() callbacks

From: Leon Winter <lwi_at_ring0.de>
Date: Sun, 17 Jan 2010 20:48:12 +0100

Hi,

>> Goal (with a C application and by avoiding the local port):
>> ssh -ND8080 proxy
>> curl --socks5 127.0.0.1:8080 http://server/download
>
> This is "just" a SOCKS5 proxy, isn't it?
Yes.
>
>> Libssh2 provides libssh2_channel_direct_tcpip_ex() and
>> libssh2_channel_write_ex() aswell as libssh2_channel_read_ex() which
>> could be used to pass our HTTP traffic there. Unfortunately libcurl
>> does not seem to offer a callback for this functions (read()/write()).
>
> Correct - it doesn't. Although I would see no problems in adding
> support for exactly that.
This would be awesome. [1]
>
>> One could start writing a socks5 proxy interface, and use it from
>> curl, but is overhead that should not be needed for this simple task.
>
> I don't understand that sentense. Doesn't libcurl already support a
> socks5 proxy good enough?
>
Libcurl does support socks5, its fine. What i meant is: It is overhead
for me to write a socks5 proxy interface for the libssh2 thing so I can
use curl with it. It would be like:

curl -> curl socks support -> [socks proxy interface to be written but
considered overhead] -> libssh2

instead of [1]:

curl -> libssh2

Regards,
Leon Winter
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-01-17