websockets: auto-tunnel through http proxy

When using a ws: or wss: url with a http proxy, automatically
switch to tunneling operation mode.

Add test_20_10 to check.

Fixes #21663
Closes #21691
This commit is contained in:
Stefan Eissing 2026-05-20 10:30:25 +02:00 committed by Daniel Stenberg
parent b158d1c9f7
commit 77e4e5b86d
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 25 additions and 5 deletions

View file

@ -237,6 +237,8 @@ struct Curl_protocol {
without having PROTOPT_SSL. */
#define PROTOPT_CONN_REUSE (1 << 16) /* this protocol can reuse connections */
#define PROTOPT_NO_TRANSFER (1 << 17) /* this protocol is not for transfers */
#define PROTOPT_HTTP_PROXY_TUNNEL (1 << 18) /* Using this protocol with a
* HTTP proxy requires tunneling */
/* Everything about a URI scheme. */
struct Curl_scheme {