cURL / Mailing Lists / curl-library / Single Mail


Re: Using libCurl over SSH Tunnel

From: Daniel Stenberg <>
Date: Mon, 12 Apr 2010 16:46:31 +0200 (CEST)

On Mon, 12 Apr 2010, Jérôme Patey wrote:

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

So why not setup the tunnel first, independently, and then just invoke libcurl
"as usual" over that tunnel? There's no need to touch libcurl code to enable

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

There's been talk in the past of making these functions customizable to allow
applications to replace them easily, but nothing has come out from those
discussions (yet).

The functions you're looking for are probably (a little depending on at which
level you're aiming to support this):

1 - Curl_write and Curl_read


2 - sread and swrite (those are defines)


List admin:
Received on 2010-04-12