Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## unreleased

* Add support for proxy types CURLPROXY_HTTPS and CURLPROXY_HTTPS2.
(Volker Diels-Grabsch)

## 0.10.0 - 14 May 2025

* Transition from the ocurl package name to curl.
Expand Down
3 changes: 3 additions & 0 deletions config/discover.ml
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@ let curl_h_declarations = [
"CURLOPT_WRITEINFO";
"CURLOPT_XFERINFOFUNCTION";

"CURLPROXY_HTTPS";
"CURLPROXY_HTTPS2";

"CURLSSLBACKEND_BEARSSL";
"CURLSSLBACKEND_GNUTLS";
"CURLSSLBACKEND_GSKIT";
Expand Down
8 changes: 7 additions & 1 deletion curl-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -3243,8 +3243,14 @@ static void handle_PROXYTYPE(Connection *conn, value option)
case 3: proxy_type = CURLPROXY_SOCKS5; break;
case 4: proxy_type = CURLPROXY_SOCKS4A; break;
case 5: proxy_type = CURLPROXY_SOCKS5_HOSTNAME; break;
#if HAVE_DECL_CURLPROXY_HTTPS
case 6: proxy_type = CURLPROXY_HTTPS; break;
#endif
#if HAVE_DECL_CURLPROXY_HTTPS2
case 7: proxy_type = CURLPROXY_HTTPS2; break;
#endif
default:
caml_failwith("Invalid curl proxy type");
caml_failwith("Unsupported curl proxy type");
}

result = curl_easy_setopt(conn->handle,
Expand Down
14 changes: 8 additions & 6 deletions curl.ml
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,14 @@ type curlSeek =
| SEEK_END

type curlProxyType =
| CURLPROXY_HTTP
| CURLPROXY_HTTP_1_0 (** added in 7.19.4 *)
| CURLPROXY_SOCKS4 (** added in 7.15.2 *)
| CURLPROXY_SOCKS5
| CURLPROXY_SOCKS4A (** added in 7.18.0 *)
| CURLPROXY_SOCKS5_HOSTNAME (** added in 7.18.0 *)
| CURLPROXY_HTTP (** since libcurl 7.10 *)
| CURLPROXY_HTTP_1_0 (** since libcurl 7.19.4 *)
| CURLPROXY_SOCKS4 (** since libcurl 7.15.2 *)
| CURLPROXY_SOCKS5 (** since libcurl 7.10 *)
| CURLPROXY_SOCKS4A (** since libcurl 7.18.0 *)
| CURLPROXY_SOCKS5_HOSTNAME (** since libcurl 7.18.0 *)
| CURLPROXY_HTTPS (** since libcurl 7.52.0 *)
| CURLPROXY_HTTPS2 (** since libcurl 8.1.0 *)

type curlSockType =
| CURLSOCKTYPE_IPCXN
Expand Down
6 changes: 4 additions & 2 deletions curl.mli
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,14 @@ type curlSeek =
| SEEK_END

type curlProxyType =
| CURLPROXY_HTTP
| CURLPROXY_HTTP (** since libcurl 7.10 *)
| CURLPROXY_HTTP_1_0 (** since libcurl 7.19.4 *)
| CURLPROXY_SOCKS4 (** since libcurl 7.15.2 *)
| CURLPROXY_SOCKS5
| CURLPROXY_SOCKS5 (** since libcurl 7.10 *)
| CURLPROXY_SOCKS4A (** since libcurl 7.18.0 *)
| CURLPROXY_SOCKS5_HOSTNAME (** since libcurl 7.18.0 *)
| CURLPROXY_HTTPS (** since libcurl 7.52.0 *)
| CURLPROXY_HTTPS2 (** since libcurl 8.1.0 *)

type curlSockType =
| CURLSOCKTYPE_IPCXN
Expand Down
Loading