diff options
author | Daniel Stenberg <daniel@haxx.se> | 2023-04-11 11:20:12 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2023-04-14 10:39:23 +0200 |
commit | e39754f6a242c99a80a274280b61e884e5abcc7e (patch) | |
tree | 5bb17bfe69c15c0470b5c98ce0c6718cd563484f /src | |
parent | c39f981ff4e0920e606eec5515b92825d3913728 (diff) | |
download | curl-e39754f6a242c99a80a274280b61e884e5abcc7e.tar.gz |
curl: add --proxy-http2
For trying HTTP/2 with an HTTPS proxy.
Closes #10926
Diffstat (limited to 'src')
-rw-r--r-- | src/tool_getparam.c | 8 | ||||
-rw-r--r-- | src/tool_listhelp.c | 5 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/tool_getparam.c b/src/tool_getparam.c index 6d6cac3db..b33e60300 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -211,6 +211,7 @@ static const struct LongShort aliases[]= { {"04", "http3", ARG_NONE}, {"05", "http3-only", ARG_NONE}, {"09", "http0.9", ARG_BOOL}, + {"0a", "proxy-http2", ARG_BOOL}, {"1", "tlsv1", ARG_NONE}, {"10", "tlsv1.0", ARG_NONE}, {"11", "tlsv1.1", ARG_NONE}, @@ -1449,6 +1450,10 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */ /* Allow HTTP/0.9 responses! */ config->http09_allowed = toggle; break; + case 'a': + /* --proxy-http2 */ + config->proxyver = CURLPROXY_HTTPS2; + break; } break; case '1': /* --tlsv1* options */ @@ -2373,7 +2378,8 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */ default: /* --proxy */ GetStr(&config->proxy, nextarg); - config->proxyver = CURLPROXY_HTTP; + if(config->proxyver != CURLPROXY_HTTPS2) + config->proxyver = CURLPROXY_HTTP; break; } break; diff --git a/src/tool_listhelp.c b/src/tool_listhelp.c index 7611cf6a0..61550de72 100644 --- a/src/tool_listhelp.c +++ b/src/tool_listhelp.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) Daniel Stenberg, <daniel.se>, et al. + * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -498,6 +498,9 @@ const struct helptxt helptext[] = { {" --proxy-header <header/@file>", "Pass custom header(s) to proxy", CURLHELP_PROXY}, + {" --proxy-http2", + "Use HTTP/2 with HTTPS proxy", + CURLHELP_HTTP | CURLHELP_PROXY}, {" --proxy-insecure", "Do HTTPS proxy connections without verifying the proxy", CURLHELP_PROXY | CURLHELP_TLS}, |