curl 官方网站提供的 curl for Windows 也是可以直接适用于 Windows 系统的。
本文提供的 curl 区别于上述官方版,采用 OpenSSL 而不是 LibreSSL;libidn2 而不是 WinIDN。是从 MSYS2 的 Package 里提取的,同样支持 HTTP3。
1. 版本号
curl 版本 8.18.0
curl 8.18.0 (Windows) libcurl/8.18.0 OpenSSL/3.6.1 zlib/1.3.2 brotli/1.2.0 zstd/1.5.7 libidn2/2.3.8 libpsl/0.21.5 libssh2/1.11.1 nghttp2/1.68.0 ngtcp2/1.20.0 nghttp3/1.15.0 WinLDAP Release-Date: 2026-01-07 Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss Features: alt-svc AsynchDNS brotli HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL SSPI threadsafe TLS-SRP UnixSockets zstd
2. 下载已经编译好的二进制文件
下载地址:
https://dl.lamp.sh/files/curl.zip
文件 curl.zip 的属性
Size: 7150995 byte,6.9 MB
md5sum: 98cc97ba6f821fde4bd0d26fa3dd8151
sha1sum: aa74248c81feaf8f6b08f0c7572b9e302ef59db0
sha256sum: d0bcc6619743595196c7ac38a31e9276054ccf85c86f2ae3f8313e16e09893d8
下载完成,直接解压到任意目录下,即可在 PowerShell 里使用。
解压到指定目录后,将该目录设置到系统环境变量里,这样即可在 PowerShell 里直接使用。
需要注意的是,由于 PowerShell 里默认会调用系统自带的 C:\Windows\System32\curl.exe 使用,所以设置环境变量时,需要将该目录上移到最上面。

重新打开 PowerShell,输入 Get-Command curl即可显示 curl 位于的绝对路径。

写在最后
请关注我的 Telegram 频道:https://t.me/qiushuiyibing
我会在此不定期发布一些杂七杂八的作品。
同时也欢迎加入交流群:https://t.me/qiushui2018
转载请注明:秋水逸冰 » Curl for Windows

