{"id":15046808,"url":"https://github.com/stunnel/static-curl","last_synced_at":"2026-01-08T04:19:03.375Z","repository":{"id":144681128,"uuid":"535010912","full_name":"stunnel/static-curl","owner":"stunnel","description":"static builds cURL with HTTP3","archived":false,"fork":false,"pushed_at":"2025-04-02T11:45:06.000Z","size":213,"stargazers_count":295,"open_issues_count":0,"forks_count":38,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-03T09:08:47.929Z","etag":null,"topics":["curl","http-client","http3","http3-client"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stunnel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-10T13:45:35.000Z","updated_at":"2025-04-01T08:37:49.000Z","dependencies_parsed_at":"2023-10-11T20:26:31.937Z","dependency_job_id":"08c6f608-89b4-4f1b-8c23-b09e8e8f5410","html_url":"https://github.com/stunnel/static-curl","commit_stats":{"total_commits":151,"total_committers":5,"mean_commits":30.2,"dds":0.3774834437086093,"last_synced_commit":"d2343c465ea031ed6c9f8266dfd0e1ceb59e2604"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stunnel%2Fstatic-curl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stunnel%2Fstatic-curl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stunnel%2Fstatic-curl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stunnel%2Fstatic-curl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stunnel","download_url":"https://codeload.github.com/stunnel/static-curl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248525635,"owners_count":21118719,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["curl","http-client","http3","http3-client"],"created_at":"2024-09-24T20:53:36.343Z","updated_at":"2026-01-08T04:19:03.369Z","avatar_url":"https://github.com/stunnel.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Static cURL with HTTP3 for Linux, macOS and Windows\n\nStatic cURL binary built with HTTP3, brotli, and zstd support.\n\nThe script will automatically retrieve the latest version of each component.  \nSimply execute it to compile the most recent version.\n\n**Included components**\n\n- [openssl](https://www.openssl.org)\n- [libssh2](https://github.com/libssh2/libssh2)\n- [nghttp3](https://github.com/ngtcp2/nghttp3)\n- [ngtcp2](https://github.com/ngtcp2/ngtcp2)\n- [nghttp2](https://github.com/nghttp2/nghttp2)\n- [brotli](https://github.com/google/brotli)\n- [zstd](https://github.com/facebook/zstd)\n- [zlib](https://zlib.net)\n- [libidn2](https://github.com/libidn/libidn2)\n- [c-ares](https://c-ares.haxx.se)\n- [libpsl](https://rockdaboot.github.io/libpsl/)\n- [trurl](https://curl.se/trurl/)\n\n`curl -V`\n- Protocols: dict file ftp ftps gopher gophers http https imap imaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss\n- Features: alt-svc asyn-rr AsynchDNS brotli HSTS HTTP2 HTTP3 HTTPS-proxy HTTPSRR IDN IPv6 Largefile libz NTLM PSL SSL SSLS-EXPORT threadsafe TLS-SRP TrackMemory UnixSockets zstd\n\n## Usage\n\nDownload the latest release from the [Releases page](https://github.com/stunnel/static-curl/releases/latest).  \nExtract the archive and use it.  \nThe binary is built with GitHub Actions.\n\n### Release files\n\nTwo versions of cURL will be released: one with ECH support (built with OpenSSL's branch feature/ecp) and one without, until OpenSSL's mainline supports ECH.\n\n- `curl-linux-ARCH-musl-VERSION`: binaries for Linux, linked with `musl`\n- `curl-linux-ARCH-glibc-VERSION`: binaries for Linux, linked with `glibc`, these binaries may have compatibility issues in certain system environments\n- `curl-linux-ARCH-dev-VERSION`: binaries, headers and static library archives for Linux, linked with `musl`(after curl v8.2.1)\n- `curl-macOS-ARCH-VERSION`: binaries for macOS\n- `curl-macOS-ARCH-dev-VERSION`: binaries, headers and static library archives for macOS\n- `curl-windows-ARCH-VERSION`: binaries for Windows\n- `curl-windows-ARCH-dev-VERSION`: binaries, headers and library archives for Windows\n\n## Known issue\nFor Linux glibc versions, if your system’s `/etc/nsswitch.conf` file is configured with `passwd: compat`, `glibc` will attempt to load `libnss_compat.so`, `libnss_nis.so`, `libpthread.so`, etc. These libraries may not be compatible with the statically linked `glibc`, and the program might crash.  \nCurrently, there is no good solution for this issue, except for compiling glibc within the script.  \nIn this case, it is recommended to use the `musl` version.\n\n## Compile\n\nThis script utilizes `clang`(glibc) and [qbt-musl-cross-make](https://github.com/userdocs/qbt-musl-cross-make)(musl) for cross-compilation on Linux, `mstorsjo/llvm-mingw` for cross-compilation for Windows, providing support for the following architectures:\n\n- Linux\n  - x86_64\n  - aarch64\n  - armv7\n  - armv5\n  - i686\n  - riscv64\n  - s390x\n  - mips64\n  - mips64el\n  - mips\n  - mipsel\n  - powerpc64le\n  - powerpc\n  - loongarch64\n- macOS\n  - x86_64\n  - aarch64\n- Windows\n  - x86_64\n  - aarch64\n  - i686\n  - armv7\n\n### How to compile\n\n#### Linux\n\n- To compile locally, install Docker, clone this Git repository, navigate to the repository directory, and then execute the following command:  \n`sh curl-static-cross.sh`  \nThe script will create a container and compile the host architecture cURL only.  \n\nsupported architectures  \n- ARCHES: `\"x86_64 aarch64 armv7 armv5 riscv64 s390x mips64 mips64el mips mipsel powerpc64le powerpc i686 loongarch64\"`\n\n- If you need to specify more parameters, run:  \n  ```shell\n  docker run --network host --rm -v $(pwd):/mnt -w /mnt \\\n      --name \"build-curl-$(date +%Y%m%d-%H%M)\" \\\n      -e ARCHES=\"x86_64 aarch64 armv7 armv5 riscv64 s390x mips64 mips64el mips mipsel powerpc64le powerpc i686 loongarch64\" \\\n      -e TLS_LIB=\"openssl\" \\\n      -e LIBC=\"glibc\" \\\n      -e QBT_MUSL_CROSS_MAKE_VERSION=\"\" \\\n      -e CURL_VERSION=\"\" \\\n      -e OPENSSL_VERSION=\"\" \\\n      -e NGTCP2_VERSION=\"\" \\\n      -e NGHTTP3_VERSION=\"\" \\\n      -e NGHTTP2_VERSION=\"\" \\\n      -e ZLIB_VERSION=\"\" \\\n      -e LIBUNISTRING_VERSION=\"\" \\\n      -e LIBIDN2_VERSION=\"\" \\\n      -e LIBPSL_VERSION=\"\" \\\n      -e ARES_VERSION=\"\" \\\n      -e ENABLE_TRURL=\"true\" \\\n      -e TRURL_VERSION=\"\" \\\n      debian:latest sh curl-static-cross.sh\n  ```\n\n#### macOS\n\nRun the following command to compile:\n\n```shell\nARCHES=\"x86_64 arm64\" \\\n    TLS_LIB=openssl \\\n    CURL_VERSION=\"\" \\\n    OPENSSL_VERSION=\"\" \\\n    NGTCP2_VERSION=\"\" \\\n    NGHTTP3_VERSION=\"\" \\\n    NGHTTP2_VERSION=\"\" \\\n    LIBIDN2_VERSION=\"\" \\\n    LIBUNISTRING_VERSION=\"\" \\\n    ZLIB_VERSION=\"\" \\\n    BROTLI_VERSION=\"\" \\\n    ZSTD_VERSION=\"\" \\\n    LIBSSH2_VERSION=\"\" \\\n    LIBPSL_VERSION=\"\" \\\n    ARES_VERSION=\"\" \\\n    bash curl-static-mac.sh\n```\n\n#### Windows\n\n- To compile locally, install Docker, clone this Git repository, navigate to the repository directory, and then execute the following command:  \n  `ARCHES=\"x86_64 i686 aarch64 armv7\" sh curl-static-win.sh`  \n  script will create a Linux container and cross-compile cURL via [LLVM MinGW toolchain](https://github.com/mstorsjo/llvm-mingw).\n\n- If you need to specify more parameters, run:\n  ```shell\n  docker run --network host --rm -v $(pwd):/mnt -w /mnt \\\n      --name \"build-curl-$(date +%Y%m%d-%H%M)\" \\\n      -e ARCHES=\"x86_64 i686 aarch64 armv7\" \\\n      -e TLS_LIB=\"openssl\" \\\n      -e CURL_VERSION=\"\" \\\n      -e OPENSSL_VERSION=\"\" \\\n      -e NGTCP2_VERSION=\"\" \\\n      -e NGHTTP3_VERSION=\"\" \\\n      -e NGHTTP2_VERSION=\"\" \\\n      -e ZLIB_VERSION=\"\" \\\n      -e LIBUNISTRING_VERSION=\"\" \\\n      -e LIBIDN2_VERSION=\"\" \\\n      -e LIBPSL_VERSION=\"\" \\\n      -e ARES_VERSION=\"\" \\\n      -e ENABLE_TRURL=\"true\" \\\n      -e TRURL_VERSION=\"\" \\\n      mstorsjo/llvm-mingw:latest sh curl-static-win.sh\n  ```\n\n#### Environment Variables\n\nSupported Environment Variables list:  \nFor all `VERSION` variables, leaving them blank will automatically fetch the latest version.\n\n- `ARCHES`: The list of architectures to compile. You can set one or multiple architectures from the following options: [Compile](#Compile)\n- `TLS_LIB`: The TLS library. Only `openssl` for now.\n- `LIBC`: The libc. `glibc`(default) or `musl`, only affects Linux.\n- `QBT_MUSL_CROSS_MAKE_VERSION`: The version of qbt-musl-cross-make, only affects `musl`. Check the releases on [qbt-musl-cross-make/releases](https://github.com/userdocs/qbt-musl-cross-make/releases)\n- `CURL_VERSION`: The version of cURL. If set to `dev`, will fetch the latest source code of branch `master` from GitHub.\n- `ENABLE_ECH`: Enable ECH support in cURL. The default value is `false`, set to `true` to enable this feature. Currently released OpenSSL versions do not support ECH. You must use OpenSSL's `feature/ech` branch; see the `OPENSSL_VERSION` and `OPENSSL_BRANCH` settings below. Current releases `static-curl` do not enable this feature, you have to compile by yourself if you need it.\n- `OPENSSL_VERSION`: The version of OpenSSL. If set to `dev`, will fetch the branch `OPENSSL_BRANCH` from GitHub.\n- `OPENSSL_BRANCH`: The branch that fetch from GitHub, this variable will be ignored if `OPENSSL_VERSION` is not set to `dev`.\n- `NGTCP2_VERSION`: The version of ngtcp2.\n- `NGHTTP3_VERSION`: The version of nghttp3.\n- `NGHTTP2_VERSION`: The version of nghttp2.\n- `LIBUNISTRING_VERSION`: The version of libunistring.\n- `LIBIDN2_VERSION`: The version of libidn2.\n- `LIBSSH2_VERSION`: The version of libssh2.\n- `ZLIB_VERSION`: The version of zlib.\n- `BROTLI_VERSION`: The version of brotli.\n- `ZSTD_VERSION`: The version of zstd.\n- `LIBPSL_VERSION`: The version of libpsl.\n- `ARES_VERSION`: The version of c-ares.\n- `TRURL_VERSION`: The version of trurl.\n- `ENABLE_TRURL`: Compile trurl. The default value is `false`, set it to `true` to enable. NOT available for macOS.\n- `ENABLE_DEBUG`: Enable curl debugging. The default value is `false`, set it to `true` to enable. This setting appends `--enable-debug` to the curl compilation options.\n\nThe compiled files will be saved in the current `release` directory.\n\n### ECH Support\n\nsee [Environment Variables](#environment-variables)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstunnel%2Fstatic-curl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstunnel%2Fstatic-curl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstunnel%2Fstatic-curl/lists"}