cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: no custom read() write() callbacks

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 24 Oct 2010 16:20:53 +0200 (CEST)

On Sun, 24 Oct 2010, Leon Winter wrote:

> Short reminder of the topic: Using CURL for HTTP operations using SSH
> tunneled TCP connections set up by libssh2.

I've tried to come up with anything that would allow this in a somewhat
reasonable way, and I can only think of two ways to do this:

A)

The one I prefer:

> there is an example shipped with libssh2 that sets up SSH TCP forwarding and
> listens on a local socket for raw TCP. So we could use
> CURLOPT_OPENSOCKETFUNCTION to fire up new TCP channels and open up local
> ports. This solution would be pretty cheap and would not require
> modifications to libcurl but would come with overhead for establishing and
> maintaining our fake tcp sockets. Additionally we bind lots of local ports
> which we would not need if we could do it the direct way.

This is the easiest way as neither libcurl nor libssh2 need to be modified.

The alternative approach B:

Implement this functionality natively within libcurl so that it knows how to
setup a SSH connection to send the traffic through. This means quite some work
and it is also a somewhat odd feature that I would not like to add to the
const of getting more conplicated code.

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

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET