This repository provides a custom-compiled version of curl for Windows that natively supports Encrypted Client Hello (ECH).
What is ECH? During a standard TLS handshake, the Server Name Indication (SNI) is sent in plaintext, revealing the exact domain you are visiting to your ISP, network administrators, or passive eavesdroppers. ECH encrypts this handshake, completely blinding network observers to your destination domain.
Supported Versions:
curl: 8.8.0wolfSSL: 5.7.0
(Native curl.exe on Windows uses Schannel, which does not support ECH. This repository solves that by providing a fully reproducible build of curl using the wolfSSL cryptography backend.)
We provide enterprise-grade build reproducibility and provenance tracking. Every GitHub Action build guarantees parity with the source code.
To verify that your downloaded curl-ech-windows-x64.zip is authentic:
Windows PowerShell:
Get-FileHash curl-ech-windows-x64.zip -Algorithm SHA256(Compare the output to the curl-ech-windows-x64.zip.sha256 file provided in the Release)
Bash / MSYS2:
sha256sum -c curl-ech-windows-x64.zip.sha256Additionally, check build-manifest.json inside the ZIP to verify the exact Git commits, source tarball hashes, and compiler versions used during the build.
You can easily compile this securely yourself using our provided scripts:
-
Install MSYS2: Open PowerShell as Administrator and run our secure installer wrapper:
.\scripts\install_msys2.ps1
(This downloads the exact MSYS2 release, verifies its SHA256 hash, and installs it to
C:\msys64) -
Run Build Script: Open the MSYS2 MinGW 64-bit terminal and run:
./scripts/build-curl-ech.sh
(This downloads the exact
curlandwolfSSLtarballs, validates their checksums, compiles them, and generates your new binary in therelease_bin/folder).
Run our automated, deterministic validation suite to ensure ECH is functioning:
./scripts/run_curl_tests.shThis suite will test endpoints with valid ECH configurations (e.g., Cloudflare Trace) and purposely broken endpoints, verifying strict TLS and ECH negotiation status without false positives.
We provide a robust, production-safe wrapper script (scripts/curl-ech-wrapper.sh) designed to intelligently manage ECH executions.
- OS Compatibility: Automatically calls
curl.exeon Windows environments to prevent alias clashes with PowerShell's nativeInvoke-WebRequest. - Version & Feature Validation: Safely parses
curl -Vto ensure you are runningcurl >= 8.8.0with ECH support compiled in. If ECH is unavailable, it gracefully disables the flag instead of crashing. - Graceful Fallbacks: If an ECH connection is rejected or fails due to network conditions, the wrapper will catch the failure and automatically retry the request without ECH, keeping your production pipelines stable.
- Debug Mode: Use the
--debugflag to see exact binary paths, version strings, and execution arrays.
Usage:
./scripts/curl-ech-wrapper.sh --ech-mode hard --debug --cacert cacert.pem --doh-url https://cloudflare-dns.com/dns-query https://cloudflare-ech.com/cdn-cgi/traceECH is a multi-layered protocol. It requires cooperation from the entire network stack.
- Client Support: Ensure you are using this custom
curl.exeand NOT your nativeC:\Windows\System32\curl.exe. Runcurl -Vand look forwolfSSLandECH. - DNS Record: The destination server must publish an
HTTPSDNS record containing theECHConfigList. Use an external tool to check if the domain supports ECH. - Secure DNS: You MUST pass a DNS-over-HTTPS server to curl using
--doh-url <url>. If you rely on standard port 53 UDP DNS, your ISP can intercept the query, or curl will fail to securely fetch the requiredHTTPSrecord. - Certificate Errors: If you get
SSL certificate problem, ensure you pass--cacert cacert.pemto provide curl with root trust anchors.
Example Command for Testing:
curl.exe -sS --cacert cacert.pem --ech hard --doh-url https://cloudflare-dns.com/dns-query https://cloudflare-ech.com/cdn-cgi/trace | grep sniMIT License