curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: How can the client visit the origin server via HTTPS proxy?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 23 Feb 2017 13:21:51 +0100 (CET)

On Thu, 23 Feb 2017, Tanyaofeng wrote:

> We write the HTTPS reverse proxy own In this scenario. It can dispatch HTTP
> messages if there is origin server's IP and port at the beginning of the
> request uri . But curl can't send out message such as "get
> https://IP4:port4/xxx/xx HTTP/1.1" but "get /xxx/xx HTTP/1.1",

It can do "GET http://..." too. That's how it does normal HTTP requests over a
HTTP proxy. There's just no standards for doing "GET https://..." so we never
made curl able to issue such requests. Doing HTTPS over a HTTP proxy is made
with CONNECT instead.

> If I call curl_easy_setopt(curl, CURLOPT_URL, "https://IP4:port4/xxx/xx");
> Can I find a way to send message such as "get https://IP4:port4/xxx/xx
> HTTP/1.1"?

Not that I can think of. That would require a change of libcurl.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2017-02-23