NScurl (NSIS plugin)
NScurl is a NSIS plugin (Nullsoft Scriptable Install System) with advanced HTTP/HTTPS capabilities.
It's implemented in C on top of libcurl with OpenSSL as SSL backend.
- Supports modern protocols and ciphers including
HTTP/3,HTTP/2,TLS1.3, etc. - Works well on Windows NT4, Windows 11 and everything in between
- Asynchronous design allowing multiple file transfers to run in parallel
- Background transfers are available, allowing your installer to perform other tasks concurrently
- Configurable timeouts and resume strategy for failed transfers
- Extensive transfer information is available for querying (size, speed, status, headers, etc.)
- Works at any
NSISinstall stage (in the.onInitcallback function, install/uninstall sections, custom pages, silent installers, etc.) - Supports custom certificate stores and certificate pinning
- Supports
HTTPandTLSauthentication - Supports common HTTP methods (
GET,POST,PUT,DELETE,HEAD, etc.) - Supports
DNS-over-HTTPSsecure name resolution - Supports custom HTTP headers and request body data
- Supports both authenticated and unauthenticated proxy servers
- Supports downloads and uploads of files larger than 4GB
- Can download remote content in-memory by passing
Memoryas the destination instead of a file path - Works well in
amd64installers created with this NSIS fork
Tip
- A GitHub Action is available to install/upgrade NSIS plugins (including
NScurl) on Windows runners - A GitHub Action is available to install/upgrade NSIS compiler on Windows, Linux or macOS runners
Check out the Getting Started wiki page.
Check out the documentation page.
Check out the NSIS test script.
; Quick transfer
NScurl::http GET "https://download.sysinternals.com/files/SysinternalsSuite.zip" "$TEMP\SysinternalsSuite.zip" /INSIST /CANCEL /RESUME /END
Pop $0 ; transfer status ("OK" for success)
; Quick transfer with GET parameters and request headers
NScurl::http GET "https://httpbin.org/get?param1=value1¶m2=value2" "$TEMP\httpbin_get.json" /HEADER "Header1: Value1" /HEADER "Header2: Value2" /END
Pop $0
; POST json data
NScurl::http POST "https://httpbin.org/post" Memory /HEADER "Content-Type: application/json" /DATA '{"number_of_the_beast":666}' /END
Pop $0
; POST json data as MIME multi-part form
NScurl::http POST "https://httpbin.org/post" Memory /POST "User" "My user name" /POST "Password" "My password" /POST FILENAME=MyFile.json TYPE=application/json "Details" '{"number_of_the_beast":666}' /END
Pop $0| Project | License |
|---|---|
| NScurl itself | BSD3 |
| brotli | MIT |
| curl | MIT/X inspired |
| nghttp2 | MIT |
| nghttp3 | MIT |
| ngtcp2 | MIT |
| OpenSSL | Apache v2 |
| zlib | zlib |
| zstd | BSD3 |