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