mirror of
https://github.com/curl/curl.git
synced 2026-08-25 18:33:42 +03:00
spacecheck: check long lines and repeat spaces, fix fallouts
Verify if lines are not longer than 192 characters. Also verify if lines have less than 79 repeat spaces (and fix one fallout). To improve readability by avoiding long lines and to prevent adding overly long lines with text that may go unnoticed in an editor or diff viewer. In addition to pre-existing line length limits: 79 for C, 132 for CMake sources. Also: - spacecheck: fix/harden allowlist regexes. - spacecheck: tidy-up quotes and simplify escaping. - spacecheck: allow folding strings with repeat spaces. - GHA: fix a suppressed shellcheck warning. - GHA/macos: simplify by dropping brew bundle. - test1119.pl: precompile a regex. - FAQ.md: delete very long link to a Windows 7/2008 support article that's lost it relevance. Closes #21087
This commit is contained in:
parent
ff3251a538
commit
62d77b12fc
28 changed files with 468 additions and 179 deletions
19
docs/ECH.md
19
docs/ECH.md
|
|
@ -106,13 +106,15 @@ cut-and-paste, e.g.:
|
|||
|
||||
```sh
|
||||
dig +short https defo.ie
|
||||
1 . ipv4hint=213.108.108.101 ech=AED+DQA8PAAgACD8WhlS7VwEt5bf3lekhHvXrQBGDrZh03n/LsNtAodbUAAEAAEAAQANY292ZXIuZGVmby5pZQAA ipv6hint=2a00:c6c0:0:116:5::10
|
||||
1 . ipv4hint=213.108.108.101 ech=AED+DQA8PAAgACD8WhlS7VwEt5bf3lekhHvXrQBGDrZh03n/LsNtAodbUAAEAAEAAQANY292ZXIuZGVmby5pZQAA
|
||||
ipv6hint=2a00:c6c0:0:116:5::10
|
||||
```
|
||||
|
||||
Then paste the base64 encoded ECHConfigList onto the curl command line:
|
||||
|
||||
```sh
|
||||
LD_LIBRARY_PATH=$HOME/code/openssl ./src/curl --ech ecl:AED+DQA8PAAgACD8WhlS7VwEt5bf3lekhHvXrQBGDrZh03n/LsNtAodbUAAEAAEAAQANY292ZXIuZGVmby5pZQAA https://defo.ie/ech-check.php
|
||||
LD_LIBRARY_PATH=$HOME/code/openssl ./src/curl --ech ecl:AED+DQA8PAAgACD8WhlS7VwEt5bf3lekhHvXrQBGDrZh03n/LsNtAodbUAAEAAEAAQANY292ZXIuZGVmby5pZQAA \
|
||||
https://defo.ie/ech-check.php
|
||||
...
|
||||
SSL_ECH_STATUS: success <img src="greentick-small.png" alt="good" /> <br/>
|
||||
...
|
||||
|
|
@ -124,7 +126,8 @@ If you paste in the wrong ECHConfigList (it changes hourly for `defo.ie`) you
|
|||
should get an error like this:
|
||||
|
||||
```sh
|
||||
LD_LIBRARY_PATH=$HOME/code/openssl ./src/curl -vvv --ech ecl:AED+DQA8yAAgACDRMQo+qYNsNRNj+vfuQfFIkrrUFmM4vogucxKj/4nzYgAEAAEAAQANY292ZXIuZGVmby5pZQAA https://defo.ie/ech-check.php
|
||||
LD_LIBRARY_PATH=$HOME/code/openssl ./src/curl -vvv --ech ecl:AED+DQA8yAAgACDRMQo+qYNsNRNj+vfuQfFIkrrUFmM4vogucxKj/4nzYgAEAAEAAQANY292ZXIuZGVmby5pZQAA \
|
||||
https://defo.ie/ech-check.php
|
||||
...
|
||||
* OpenSSL/3.3.0: error:0A00054B:SSL routines::ech required
|
||||
...
|
||||
|
|
@ -139,9 +142,12 @@ good value, via the `retry_configs` mechanism. You can see that value in
|
|||
the verbose output, e.g.:
|
||||
|
||||
```sh
|
||||
LD_LIBRARY_PATH=$HOME/code/openssl ./src/curl -vvv --ech ecl:AED+DQA8yAAgACDRMQo+qYNsNRNj+vfuQfFIkrrUFmM4vogucxKj/4nzYgAEAAEAAQANY292ZXIuZGVmby5pZQAA https://defo.ie/ech-check.php
|
||||
LD_LIBRARY_PATH=$HOME/code/openssl ./src/curl -vvv --ech ecl:AED+DQA8yAAgACDRMQo+qYNsNRNj+vfuQfFIkrrUFmM4vogucxKj/4nzYgAEAAEAAQANY292ZXIuZGVmby5pZQAA \
|
||||
https://defo.ie/ech-check.php
|
||||
...
|
||||
* ECH: retry_configs AQD+DQA8DAAgACBvYqJy+Hgk33wh/ZLBzKSPgwxeop7gvojQzfASq7zeZQAEAAEAAQANY292ZXIuZGVmby5pZQAA/g0APEMAIAAgXkT5r4cYs8z19q5rdittyIX8gfQ3ENW4wj1fVoiJZBoABAABAAEADWNvdmVyLmRlZm8uaWUAAP4NADw2ACAAINXSE9EdXzEQIJZA7vpwCIQsWqsFohZARXChgPsnfI1kAAQAAQABAA1jb3Zlci5kZWZvLmllAAD+DQA8cQAgACASeiD5F+UoSnVoHvA2l1EifUVMFtbVZ76xwDqmMPraHQAEAAEAAQANY292ZXIuZGVmby5pZQAA
|
||||
* ECH: retry_configs AQD+DQA8DAAgACBvYqJy+Hgk33wh/ZLBzKSPgwxeop7gvojQzfASq7zeZQAEAAEAAQANY292ZXIuZGVmby5pZQAA/g0APEMAIAAgXkT5r4cYs8z19q5rdittyIX
|
||||
8gfQ3ENW4wj1fVoiJZBoABAABAAEADWNvdmVyLmRlZm8uaWUAAP4NADw2ACAAINXSE9EdXzEQIJZA7vpwCIQsWqsFohZARXChgPsnfI1kAAQAAQABAA1jb3Zlci5kZWZvLmllAAD+DQA8c
|
||||
QAgACASeiD5F+UoSnVoHvA2l1EifUVMFtbVZ76xwDqmMPraHQAEAAEAAQANY292ZXIuZGVmby5pZQAA
|
||||
* ECH: retry_configs for defo.ie from cover.defo.ie, 319
|
||||
...
|
||||
```
|
||||
|
|
@ -453,7 +459,8 @@ In another window:
|
|||
|
||||
```sh
|
||||
cd $HOME/code/curl/
|
||||
./src/curl -vvv --insecure --connect-to foo.example.com:8443:localhost:8443 --ech ecl:AD7+DQA6uwAgACBix2B78sX+EQhEbxMspDOc8Z3xVS5aQpYP0Cxpc2AWPAAEAAEAAQALZXhhbXBsZS5jb20AAA==
|
||||
./src/curl -vvv --insecure --connect-to foo.example.com:8443:localhost:8443 \
|
||||
--ech ecl:AD7+DQA6uwAgACBix2B78sX+EQhEbxMspDOc8Z3xVS5aQpYP0Cxpc2AWPAAEAAEAAQALZXhhbXBsZS5jb20AAA==
|
||||
```
|
||||
|
||||
### Automated use of `retry_configs` not supported so far...
|
||||
|
|
|
|||
|
|
@ -886,8 +886,7 @@ packet sent three seconds after the first and the third six seconds after
|
|||
the second. No more than three packets are sent, no matter how long the
|
||||
timeout is set.
|
||||
|
||||
See option `TcpMaxConnectRetransmissions` on [this
|
||||
page](https://support.microsoft.com/topic/hotfix-enables-the-configuration-of-the-tcp-maximum-syn-retransmission-amount-in-windows-7-or-windows-server-2008-r2-1b6f8352-2c5f-58bb-ead7-2cf021407c8e).
|
||||
See Windows option `TcpMaxConnectRetransmissions` for more.
|
||||
|
||||
Also, even on non-Windows systems there may run a firewall or anti-virus
|
||||
software or similar that accepts the connection but does not actually do
|
||||
|
|
|
|||
|
|
@ -78,7 +78,8 @@ Build ngtcp2:
|
|||
% cd ngtcp2
|
||||
% autoreconf -fi
|
||||
# Change --with-openssl to --with-boringssl for AWS-LC and BoringSSL
|
||||
% ./configure PKG_CONFIG_PATH=/path/to/openssl/lib/pkgconfig:/path/to/nghttp3/lib/pkgconfig LDFLAGS="-Wl,-rpath,/path/to/openssl/lib" --prefix=/path/to/ngtcp2 --enable-lib-only --with-openssl
|
||||
% ./configure PKG_CONFIG_PATH=/path/to/openssl/lib/pkgconfig:/path/to/nghttp3/lib/pkgconfig LDFLAGS="-Wl,-rpath,/path/to/openssl/lib" \
|
||||
--prefix=/path/to/ngtcp2 --enable-lib-only --with-openssl
|
||||
% make
|
||||
% make install
|
||||
|
||||
|
|
@ -88,7 +89,8 @@ Build curl (with autotools):
|
|||
% git clone https://github.com/curl/curl
|
||||
% cd curl
|
||||
% autoreconf -fi
|
||||
% ./configure PKG_CONFIG_PATH=/path/to/openssl/lib/pkgconfig LDFLAGS="-Wl,-rpath,/path/to/openssl/lib" --with-openssl=/path/to/openssl --with-ngtcp2=/path/to/ngtcp2 --with-nghttp3=/path/to/nghttp3
|
||||
% ./configure PKG_CONFIG_PATH=/path/to/openssl/lib/pkgconfig LDFLAGS="-Wl,-rpath,/path/to/openssl/lib" \
|
||||
--with-openssl=/path/to/openssl --with-ngtcp2=/path/to/ngtcp2 --with-nghttp3=/path/to/nghttp3
|
||||
% make
|
||||
% make install
|
||||
|
||||
|
|
@ -97,7 +99,8 @@ Build curl (with CMake):
|
|||
% cd ..
|
||||
% git clone https://github.com/curl/curl
|
||||
% cd curl
|
||||
% PKG_CONFIG_PATH=/path/to/openssl/lib/pkgconfig:/path/to/ngtcp2/lib/pkgconfig:/path/to/nghttp3/lib/pkgconfig cmake -B bld -DOPENSSL_ROOT_DIR=/path/to/openssl -DUSE_NGTCP2=ON
|
||||
% PKG_CONFIG_PATH=/path/to/openssl/lib/pkgconfig:/path/to/ngtcp2/lib/pkgconfig:/path/to/nghttp3/lib/pkgconfig cmake -B bld \
|
||||
-DOPENSSL_ROOT_DIR=/path/to/openssl -DUSE_NGTCP2=ON
|
||||
% cmake --build bld
|
||||
|
||||
## Build with GnuTLS
|
||||
|
|
@ -128,7 +131,8 @@ Build ngtcp2:
|
|||
% git clone -b $NGTCP2_VERSION https://github.com/ngtcp2/ngtcp2
|
||||
% cd ngtcp2
|
||||
% autoreconf -fi
|
||||
% ./configure PKG_CONFIG_PATH=/path/to/gnutls/lib/pkgconfig:/path/to/nghttp3/lib/pkgconfig LDFLAGS="-Wl,-rpath,/path/to/gnutls/lib" --prefix=/path/to/ngtcp2 --enable-lib-only --with-gnutls
|
||||
% ./configure PKG_CONFIG_PATH=/path/to/gnutls/lib/pkgconfig:/path/to/nghttp3/lib/pkgconfig LDFLAGS="-Wl,-rpath,/path/to/gnutls/lib" \
|
||||
--prefix=/path/to/ngtcp2 --enable-lib-only --with-gnutls
|
||||
% make
|
||||
% make install
|
||||
|
||||
|
|
@ -178,7 +182,8 @@ Build ngtcp2:
|
|||
% git clone -b $NGTCP2_VERSION https://github.com/ngtcp2/ngtcp2
|
||||
% cd ngtcp2
|
||||
% autoreconf -fi
|
||||
% ./configure PKG_CONFIG_PATH=/path/to/wolfssl/lib/pkgconfig:/path/to/nghttp3/lib/pkgconfig LDFLAGS="-Wl,-rpath,/path/to/wolfssl/lib" --prefix=/path/to/ngtcp2 --enable-lib-only --with-wolfssl
|
||||
% ./configure PKG_CONFIG_PATH=/path/to/wolfssl/lib/pkgconfig:/path/to/nghttp3/lib/pkgconfig LDFLAGS="-Wl,-rpath,/path/to/wolfssl/lib" \
|
||||
--prefix=/path/to/ngtcp2 --enable-lib-only --with-wolfssl
|
||||
% make
|
||||
% make install
|
||||
|
||||
|
|
@ -225,7 +230,8 @@ Build curl:
|
|||
% git clone https://github.com/curl/curl
|
||||
% cd curl
|
||||
% autoreconf -fi
|
||||
% ./configure LDFLAGS="-Wl,-rpath,$PWD/../quiche/target/release" --with-openssl=$PWD/../quiche/quiche/deps/boringssl/src --with-quiche=$PWD/../quiche/target/release
|
||||
% ./configure LDFLAGS="-Wl,-rpath,$PWD/../quiche/target/release" \
|
||||
--with-openssl=$PWD/../quiche/quiche/deps/boringssl/src --with-quiche=$PWD/../quiche/target/release
|
||||
% make
|
||||
% make install
|
||||
|
||||
|
|
@ -323,7 +329,9 @@ Get, build and install nghttp2:
|
|||
% git clone https://github.com/nghttp2/nghttp2
|
||||
% cd nghttp2
|
||||
% autoreconf -fi
|
||||
% PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/home/daniel/build-quictls/lib/pkgconfig:/home/daniel/build-nghttp3/lib/pkgconfig:/home/daniel/build-ngtcp2/lib/pkgconfig LDFLAGS=-L/home/daniel/build-quictls/lib CFLAGS=-I/home/daniel/build-quictls/include ./configure --enable-maintainer-mode --prefix=/home/daniel/build-nghttp2 --disable-shared --enable-app --enable-http3 --without-jemalloc --without-libxml2 --without-systemd
|
||||
% PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/path/to/quictls/lib/pkgconfig:/path/to/nghttp3/lib/pkgconfig:/path/to/ngtcp2/lib/pkgconfig \
|
||||
LDFLAGS=-L/path/to/quictls/lib CFLAGS=-I/path/to/quictls/include ./configure --enable-maintainer-mode \
|
||||
--prefix=/path/to/nghttp2 --disable-shared --enable-app --enable-http3 --without-jemalloc --without-libxml2 --without-systemd
|
||||
% make && make install
|
||||
|
||||
Run the local h3 server on port 9443, make it proxy all traffic through to
|
||||
|
|
@ -332,7 +340,7 @@ exists in curl's test dir.
|
|||
|
||||
% CERT=/path/to/stunnel.pem
|
||||
% $HOME/bin/nghttpx $CERT $CERT --backend=localhost,80 \
|
||||
--frontend="localhost,9443;quic"
|
||||
--frontend="localhost,9443;quic"
|
||||
|
||||
### Caddy
|
||||
|
||||
|
|
|
|||
|
|
@ -254,7 +254,8 @@ target_link_libraries(my_target PRIVATE CURL::libcurl)
|
|||
- `CURL_CA_FALLBACK`: Use built-in CA store of OpenSSL. Default: `OFF`
|
||||
- `CURL_CA_NATIVE`: Use native CA store. Default: `OFF`
|
||||
Supported by GnuTLS, OpenSSL (including forks) on Windows, wolfSSL.
|
||||
- `CURL_CA_PATH`: Absolute path to a directory containing CA certificates stored individually. Set `none` to disable or `auto` for auto-detection. Default: `auto`
|
||||
- `CURL_CA_PATH`: Absolute path to a directory containing CA certificates stored individually.
|
||||
Set `none` to disable or `auto` for auto-detection. Default: `auto`
|
||||
- `CURL_CA_SEARCH_SAFE`: Enable safe CA bundle search (within the curl tool directory) on Windows. Default: `OFF`
|
||||
|
||||
## Enabling features
|
||||
|
|
@ -347,18 +348,21 @@ Details via CMake
|
|||
## Dependencies
|
||||
|
||||
- `CURL_BROTLI`: Use brotli (`ON`, `OFF` or `AUTO`). Default: `AUTO`
|
||||
- `CURL_USE_CMAKECONFIG`: Enable detecting dependencies via CMake Config. Default: `ON` for MSVC (except under vcpkg), if not cross-compiling. (experimental)
|
||||
- `CURL_USE_CMAKECONFIG`: Enable detecting dependencies via CMake Config.
|
||||
Default: `ON` for MSVC (except under vcpkg), if not cross-compiling. (experimental)
|
||||
- `CURL_USE_GNUTLS`: Enable GnuTLS for SSL/TLS. Default: `OFF`
|
||||
- `CURL_USE_GSASL`: Use libgsasl. Default: `OFF`
|
||||
- `CURL_USE_GSSAPI`: Use GSSAPI implementation. Default: `OFF`
|
||||
- `CURL_USE_LIBBACKTRACE`: Use [libbacktrace](https://github.com/ianlancetaylor/libbacktrace). Requires debug-enabled build and DWARF debug information. Default: `OFF`
|
||||
- `CURL_USE_LIBBACKTRACE`: Use [libbacktrace](https://github.com/ianlancetaylor/libbacktrace).
|
||||
Requires debug-enabled build and DWARF debug information. Default: `OFF`
|
||||
- `CURL_USE_LIBPSL`: Use libpsl. Default: `ON`
|
||||
- `CURL_USE_LIBSSH2`: Use libssh2. Default: `ON`
|
||||
- `CURL_USE_LIBSSH`: Use libssh. Default: `OFF`
|
||||
- `CURL_USE_LIBUV`: Use libuv for event-based tests. Default: `OFF`
|
||||
- `CURL_USE_MBEDTLS`: Enable mbedTLS for SSL/TLS. Default: `OFF`
|
||||
- `CURL_USE_OPENSSL`: Enable OpenSSL for SSL/TLS. Default: `ON` if no other TLS backend was enabled.
|
||||
- `CURL_USE_PKGCONFIG`: Enable `pkg-config` to detect dependencies. Default: `ON` for Unix (except Android, Apple devices), vcpkg, MinGW if not cross-compiling.
|
||||
- `CURL_USE_PKGCONFIG`: Enable `pkg-config` to detect dependencies.
|
||||
Default: `ON` for Unix (except Android, Apple devices), vcpkg, MinGW if not cross-compiling.
|
||||
- `CURL_USE_RUSTLS`: Enable Rustls for SSL/TLS. Default: `OFF`
|
||||
- `CURL_USE_SCHANNEL`: Enable Windows native SSL/TLS (Schannel). Default: `OFF`
|
||||
- `CURL_USE_WOLFSSL`: Enable wolfSSL for SSL/TLS. Default: `OFF`
|
||||
|
|
@ -378,13 +382,16 @@ Details via CMake
|
|||
|
||||
- `OPENSSL_ROOT_DIR`: Absolute path to the root installation of OpenSSL (and forks).
|
||||
- `OPENSSL_INCLUDE_DIR`: Absolute path to OpenSSL include directory.
|
||||
- `OPENSSL_SSL_LIBRARY`: Absolute path to `ssl` library. With MSVC, CMake uses variables `SSL_EAY_DEBUG`/`SSL_EAY_RELEASE` instead.
|
||||
- `OPENSSL_CRYPTO_LIBRARY`: Absolute path to `crypto` library. With MSVC, CMake uses variables `LIB_EAY_DEBUG`/`LIB_EAY_RELEASE` instead.
|
||||
- `OPENSSL_SSL_LIBRARY`: Absolute path to `ssl` library.
|
||||
With MSVC, CMake uses variables `SSL_EAY_DEBUG`/`SSL_EAY_RELEASE` instead.
|
||||
- `OPENSSL_CRYPTO_LIBRARY`: Absolute path to `crypto` library.
|
||||
With MSVC, CMake uses variables `LIB_EAY_DEBUG`/`LIB_EAY_RELEASE` instead.
|
||||
- `OPENSSL_USE_STATIC_LIBS`: Look for static OpenSSL libraries.
|
||||
- `ZLIB_INCLUDE_DIR`: Absolute path to zlib include directory.
|
||||
- `ZLIB_LIBRARY`: Absolute path to `zlib` library.
|
||||
- `ZLIB_USE_STATIC_LIBS`: Look for static `zlib` library (requires CMake v3.24).
|
||||
- `<PackageName>_DIR`: Absolute path to `<PackageName>` CMake Config directory where `*.cmake` files reside. Used when `CURL_USE_CMAKECONFIG` is enabled.
|
||||
- `<PackageName>_DIR`: Absolute path to `<PackageName>` CMake Config directory where `*.cmake` files reside.
|
||||
Used when `CURL_USE_CMAKECONFIG` is enabled.
|
||||
`<PackageName>` may be:
|
||||
`Libssh2`, `MbedTLS`, `NGHTTP2`, `NGHTTP3`,
|
||||
`NGTCP2` 1.19.0+ (with non-fork OpenSSL only),
|
||||
|
|
|
|||
|
|
@ -221,7 +221,8 @@ understanding if you are not going to follow the advice given above.
|
|||
|
||||
- [How To Use the C Runtime](https://learn.microsoft.com/troubleshoot/developer/visualstudio/cpp/libraries/use-c-run-time)
|
||||
- [Runtime Library Compiler Options](https://learn.microsoft.com/cpp/build/reference/md-mt-ld-use-run-time-library)
|
||||
- [Potential Errors Passing CRT Objects Across DLL Boundaries](https://learn.microsoft.com/cpp/c-runtime-library/potential-errors-passing-crt-objects-across-dll-boundaries)
|
||||
- [Potential Errors Passing CRT Objects
|
||||
Across DLL Boundaries](https://learn.microsoft.com/cpp/c-runtime-library/potential-errors-passing-crt-objects-across-dll-boundaries)
|
||||
|
||||
If your app is misbehaving in some strange way, or it is suffering from memory
|
||||
corruption, before asking for further help, please try first to rebuild every
|
||||
|
|
|
|||
|
|
@ -127,7 +127,10 @@ Download a file passing the **--progress-bar** and **--http2** flags to curl:
|
|||
|
||||
**wcurl --curl-options="--progress-bar --http2" example.com/filename.txt**
|
||||
|
||||
* Resume from an interrupted download. The options necessary to resume the download (`--clobber --continue-at -`) must be the **last** options specified in `--curl-options`. Note that the only way to resume interrupted downloads is to allow wcurl to overwrite the destination file:
|
||||
Resume from an interrupted download. The options necessary to resume the download
|
||||
(`--clobber --continue-at -`) must be the **last** options specified in `--curl-options`.
|
||||
Note that the only way to resume interrupted downloads is to allow wcurl to overwrite
|
||||
the destination file:
|
||||
|
||||
**wcurl --curl-options="--clobber --continue-at -" example.com/filename.txt**
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue