cURL / Mailing Lists / curl-library / Single Mail

curl-library

Using libCurl over SSH Tunnel

From: Jérôme Patey <jerome_at_patey.net>
Date: Mon, 12 Apr 2010 16:40:09 +0200

Hi,

I wanted to use libCurl over a SSH proxy. That is, I connect to
the remove server using SSH, then create a tunnel, and I want to use the
resulting socket in libCurl.

I am using libssh2, and functions are
provided to create a tunnel. Then, I have a custom_read() and
custom_write(), which "encrypt" the data and send them on the other side of
the server, the "decrypt" the data, as if there was no SSH.

The problem
is that I don't know where to replace the socket_read and socket_write
which are hardcoded everywhere in libCurl... so I wanted to know if anyone
had an idea about that.

I want to use HTTP and HTTPS.

My question is:

libCurl gurus, do you know which function of libCurl I can override so
that all read/write on the socket go through my functions ?

In fact, I
want to do something quite similar to the SOCK5 proxy... but over SSH
instead of SOCK5.

Thanks a lot!

-- 
Jérôme Patey - jerome_at_patey.net

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