cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Http Message flow through two proxies

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 12 Nov 2006 12:52:31 +0100 (CET)

On Sun, 12 Nov 2006, Ambuj Jain wrote:

> We like to use libcurl to go through two proxies over https protocol.

I think you're progressing a bit too fast for me here. If you want to go
through multiple proxies, why don't you provide the necessary changes to allow
libcurl to do this?

> Howerver, with the existing curl 7.16.0, we can't do it because it doesn?t
> allow to user to build a Http CONNECT packet, that need to be send over the
> proxy tunnel established with very first proxy to create a second proxy
> tunnel. We can do the same to create a custom CONNECT request packet and
> sent it through raw socket (connected with first proxy), that we can get by
> CURLINFO_LASTSOCKET option. But this is fine if data transfer is being over
> http protocol. But if we want it over secure layer, anyway we need to use
> curl internal API Curl_read() and Curl_write() to get/send the data.

*NO*. You _never_ need to use those functions and we will never make those
public or even write things to make external applications to use them easily.
We work hard to provide a good, useful and stable public API (and ABI too) and
that is what you should use.

The moment you decide to poke around in and use internal library functions,
you leave the nice and warm community of good libcurl-using applications.

If you get a socket with CURLINFO_LASTSOCKET you are pretty much on your own
and you need to deal with that.

> Can you look into the code and help us to implement the same only by using
> the external curl call.

I would prefer to approach this in the opposite direction: What exactly do you
want to do?

My understanding is that you CONNECT to the first proxy and you want to
CONNECT on a second one and then issue the "actual" request on the remote
server?

How would you *like* this to work API-wise in libcurl?

> Second issue is that the same code works fine if it is build with curl
> 7.15.5 but it crashes with curl 7.16.0 after sometimes (after some read and
> write calls). I took the snapshot attached with mail when it happened.

Sorry, but you are on your own with this nasty hack. But do ask specific
questions and I'll try to respond as good as I can.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-11-12