cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: no custom read() write() callbacks

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 17 Jan 2010 19:36:26 +0100 (CET)

On Sat, 16 Jan 2010, Leon Winter wrote:

> in order to built an C based application that downloads files via remote
> ssh-proxies I thought libcurl+libssh2 would be good choice.
>
> 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?

> 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.

> 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?

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