From 53e45042b0b8896790211bec6b7542a717d7a252 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 30 Dec 2024 16:44:52 +0100 Subject: [PATCH 1/4] setup.md: add --ip-toc and --mptcp Fixes #464 Fixes #465 --- SUMMARY.md | 2 +- index-words | 5 ++++ usingcurl/connections/setup.md | 48 ++++++++++++++++++++++++++++++++++ usingcurl/connections/vlan.md | 11 -------- 4 files changed, 54 insertions(+), 12 deletions(-) create mode 100644 usingcurl/connections/setup.md delete mode 100644 usingcurl/connections/vlan.md diff --git a/SUMMARY.md b/SUMMARY.md index 0aa0370c1..48381af8e 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -106,7 +106,7 @@ * [Compression](usingcurl/transfers/compression.md) * [Skip download if already done](usingcurl/transfers/skip.md) * [Connections](usingcurl/connections/README.md) - * [VLAN](usingcurl/connections/vlan.md) + * [Setup](usingcurl/connections/setup.md) * [Name resolve tricks](usingcurl/connections/name.md) * [Connection timeout](usingcurl/connections/timeout.md) * [Happy Eyeballs](usingcurl/connections/happy.md) diff --git a/index-words b/index-words index 97cc2d285..5d0f1acc2 100644 --- a/index-words +++ b/index-words @@ -33,6 +33,7 @@ --http2-prior-knowledge --http3 --http3-only +--ip-tos --ipfs-gateway --json --keepalive-cnt @@ -44,6 +45,7 @@ --max-filesize --max-time --metalink +--mptcp --negotiate --netrc-file --netrc-optional @@ -342,6 +344,7 @@ MITM-proxies MQTT mTLS multi-threading +Multipath TCP name resolving nghttp2 nix @@ -417,8 +420,10 @@ TFTP TLS TLS backend TODO +Traffic Class transfer-encoding trurl +Type of Service Ubuntu URL Globbing URL parser diff --git a/usingcurl/connections/setup.md b/usingcurl/connections/setup.md new file mode 100644 index 000000000..20c7d83e1 --- /dev/null +++ b/usingcurl/connections/setup.md @@ -0,0 +1,48 @@ +# Setup + +There are several options that let the user control different aspects of how +connections are setup. + +## VLAN + +With the `--vlan-priority` command line option you set a priority value +between 0 and 7 that is set in the Ethernet header. It is thus limited to your +local network only and will not be used across any routers. + +VLAN priority as defined in IEEE 802.1Q. + +Example: + + curl --vlan-priority 4 https://example.com + +## Type of Service + +The IPv4 protocol header has a "Type of Service (TOS)" field. It is called +"Traffic Class" in IPv6. A user can set the value using the `--ip-tos` option +to either a numerical value between zero and 255, or by using one of the +recognized names: + +CS0, CS1, CS2, CS3, CS4, CS5, CS6, CS7, AF11, AF12, AF13, AF21, AF22, AF23, +AF31, AF32, AF33, AF41, AF42, AF43, EF, VOICE-ADMIT, ECT1, ECT0, CE, LE, +LOWCOST, LOWDELAY, THROUGHPUT, RELIABILITY, MINCOST + +Example: + + curl --ip-tos CS5 https://example.com + +## Multipath TCP + +Multipath TCP is a way for a TCP connection to use multiple concurrent network +paths to maximize throughput and increase redundancy, compared to the normal +single path that ordinary TCP uses. + +You can ask curl to use Multipath TCP with the `--mptcp` option. It only works +on Linux and it requires Linux 5.6 or later. It has no effect on QUIC or UDP +connections. + +The server curl connects to must also support MPTCP. If not, the connection +seamlessly falls back to "normal" TCP. + +Example: + + curl --mptcp https://example.com diff --git a/usingcurl/connections/vlan.md b/usingcurl/connections/vlan.md deleted file mode 100644 index 7c7f10b13..000000000 --- a/usingcurl/connections/vlan.md +++ /dev/null @@ -1,11 +0,0 @@ -# VLAN - -With the `--vlan-priority` command line option you set a priority value -between 0 and 7 that is set in the Ethernet header. It is thus limited to your -local network only and will not be used across any routers. - -VLAN priority as defined in IEEE 802.1Q. - -Example: - - curl --vlan-priority 4 https://example.com From 01b0df40e131c7bc68ad276a66076a258708af8a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 30 Dec 2024 16:47:25 +0100 Subject: [PATCH 2/4] bookindex: regen --- bookindex.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/bookindex.md b/bookindex.md index 95d6564ba..dae230793 100644 --- a/bookindex.md +++ b/bookindex.md @@ -262,10 +262,11 @@ - IETF: [Protocols](protocols/protocols.md#protocols), [TLS versions](usingcurl/tls/versions.md#tls-versions) - Indentation: [Indentation](source/style.md#indentation) - International Domain Names: [libidn2](build/deps.md#libidn2), [International Domain Names (IDN)](cmdline/urls/host.md#international-domain-names-idn), [Line 4: Features](cmdline/curlver.md#line-4-features) + - --ip-tos: [Type of Service](usingcurl/connections/setup.md#type-of-service) - IPFS: [IPFS](usingcurl/ipfs.md#ipfs) - --ipfs-gateway: [Gateway](usingcurl/ipfs.md#gateway) - - IPv4: [Host](cmdline/urls/host.md#host), [Port number](cmdline/urls/port.md#port-number), [Available --write-out variables](usingcurl/verbose/writeout.md#available---write-out-variables), [Happy Eyeballs](usingcurl/connections/happy.md#happy-eyeballs), [curl and haproxy](usingcurl/proxies/haproxy.md#curl-and-haproxy), [All options](transfers/options/all.md#all-options), [How libcurl connects](transfers/conn/how.md#how-libcurl-connects), [Name resolving](transfers/conn/names.md#name-resolving), [`host*.c` sources](internals/resolving.md#host-dot-c-sources), [Variables](internals/tests/file-format.md#variables) - - IPv6: [Host](cmdline/urls/host.md#host), [Port number](cmdline/urls/port.md#port-number), [URL globbing](cmdline/urls/globbing.md#url-globbing), [Version](cmdline/curlver.md#version), [Available --write-out variables](usingcurl/verbose/writeout.md#available---write-out-variables), [Happy Eyeballs](usingcurl/connections/happy.md#happy-eyeballs), [SOCKS proxy](usingcurl/proxies/socks.md#socks-proxy), [curl and haproxy](usingcurl/proxies/haproxy.md#curl-and-haproxy), [All options](transfers/options/all.md#all-options), [How libcurl connects](transfers/conn/how.md#how-libcurl-connects), [Name resolving](transfers/conn/names.md#name-resolving), [Zone ID](helpers/url/get-part.md#zone-id), [`CURLRES_IPV6`](internals/resolving.md#curlres_ipv6), [Variables](internals/tests/file-format.md#variables) + - IPv4: [Host](cmdline/urls/host.md#host), [Port number](cmdline/urls/port.md#port-number), [Available --write-out variables](usingcurl/verbose/writeout.md#available---write-out-variables), [Type of Service](usingcurl/connections/setup.md#type-of-service), [Happy Eyeballs](usingcurl/connections/happy.md#happy-eyeballs), [curl and haproxy](usingcurl/proxies/haproxy.md#curl-and-haproxy), [All options](transfers/options/all.md#all-options), [How libcurl connects](transfers/conn/how.md#how-libcurl-connects), [Name resolving](transfers/conn/names.md#name-resolving), [`host*.c` sources](internals/resolving.md#host-dot-c-sources), [Variables](internals/tests/file-format.md#variables) + - IPv6: [Host](cmdline/urls/host.md#host), [Port number](cmdline/urls/port.md#port-number), [URL globbing](cmdline/urls/globbing.md#url-globbing), [Version](cmdline/curlver.md#version), [Available --write-out variables](usingcurl/verbose/writeout.md#available---write-out-variables), [Type of Service](usingcurl/connections/setup.md#type-of-service), [Happy Eyeballs](usingcurl/connections/happy.md#happy-eyeballs), [SOCKS proxy](usingcurl/proxies/socks.md#socks-proxy), [curl and haproxy](usingcurl/proxies/haproxy.md#curl-and-haproxy), [All options](transfers/options/all.md#all-options), [How libcurl connects](transfers/conn/how.md#how-libcurl-connects), [Name resolving](transfers/conn/names.md#name-resolving), [Zone ID](helpers/url/get-part.md#zone-id), [`CURLRES_IPV6`](internals/resolving.md#curlres_ipv6), [Variables](internals/tests/file-format.md#variables) - IRC: [How it started](project/started.md#how-it-started), [Project communication](project/comm.md#project-communication) ## J @@ -302,9 +303,11 @@ - --max-filesize: [Maximum filesize](usingcurl/downloads/max-filesize.md#maximum-filesize) - --max-time: [Tweak your retries](usingcurl/downloads/retry.md#tweak-your-retries), [Maximum time allowed to spend](usingcurl/timeouts.md#maximum-time-allowed-to-spend) - MIT: [License](source/opensource/license.md#license) + - --mptcp: [Multipath TCP](usingcurl/connections/setup.md#multipath-tcp) - MQTT: [What protocols does curl support?](protocols/protocols.md#what-protocols-does-curl-support), [MQTT](protocols/curl.md#mqtt), [Supported schemes](cmdline/urls/scheme.md#supported-schemes), [Line 3: Protocols](cmdline/curlver.md#line-3-protocols), [MQTT](usingcurl/mqtt.md#mqtt), [Variables](internals/tests/file-format.md#variables), [Test servers](internals/tests/servers.md#test-servers) - mTLS: [Client certificates](usingcurl/tls/clientcert.md#client-certificates) - multi-threading: [multi-threading](libcurl/threading.md#multi-threading) + - Multipath TCP: [Multipath TCP](usingcurl/connections/setup.md#multipath-tcp) ## N @@ -355,7 +358,7 @@ ## Q - -Q: [Quote](ftp/cmds.md#quote) - - QUIC: [Establish a connection](protocols/network.md#establish-a-connection), [HTTPS](protocols/curl.md#https), [QUIC and HTTP/3](build/deps.md#quic-and-http-slash-3), [Available exit codes](cmdline/exitcode.md#available-exit-codes), [HTTP/3 racing](usingcurl/connections/happy.md#http-slash-3-racing), [Never spend more than this to connect](usingcurl/timeouts.md#never-spend-more-than-this-to-connect), [QUIC](http/versions/http3.md#quic), [Which libcurl version runs](libcurl/api.md#which-libcurl-version-runs), [HTTP/3](transfers/conn/how.md#http-slash-3), [Enable keep alive](transfers/conn/keepalive.md#enable-keep-alive), [Authentication](transfers/auth.md#authentication), [Version 3 can be mandatory](libcurl-http/versions.md#version-3-can-be-mandatory), [HTTP/3 backends](internals/backends.md#http-slash-3-backends) + - QUIC: [Establish a connection](protocols/network.md#establish-a-connection), [HTTPS](protocols/curl.md#https), [QUIC and HTTP/3](build/deps.md#quic-and-http-slash-3), [Available exit codes](cmdline/exitcode.md#available-exit-codes), [Multipath TCP](usingcurl/connections/setup.md#multipath-tcp), [HTTP/3 racing](usingcurl/connections/happy.md#http-slash-3-racing), [Never spend more than this to connect](usingcurl/timeouts.md#never-spend-more-than-this-to-connect), [QUIC](http/versions/http3.md#quic), [Which libcurl version runs](libcurl/api.md#which-libcurl-version-runs), [HTTP/3](transfers/conn/how.md#http-slash-3), [Enable keep alive](transfers/conn/keepalive.md#enable-keep-alive), [Authentication](transfers/auth.md#authentication), [Version 3 can be mandatory](libcurl-http/versions.md#version-3-can-be-mandatory), [HTTP/3 backends](internals/backends.md#http-slash-3-backends) - --quote: [Quote](ftp/cmds.md#quote) ## R @@ -438,7 +441,7 @@ ## T - -T: [PUT](usingcurl/uploads.md#put), [Upload](usingcurl/tftp.md#upload), [Method](http/method.md#method), [HTTP PUT](http/put.md#http-put), [Uploading with FTP](ftp/upload.md#uploading-with-ftp) - - TCP: [Establish a connection](protocols/network.md#establish-a-connection), [How much do protocols change?](protocols/protocols.md#how-much-do-protocols-change), [DICT](protocols/curl.md#dict), [TCP vs UDP](cmdline/urls/port.md#tcp-vs-udp), [Available exit codes](cmdline/exitcode.md#available-exit-codes), [Available --write-out variables](usingcurl/verbose/writeout.md#available---write-out-variables), [Connection timeout](usingcurl/connections/timeout.md#connection-timeout), [HTTP/3 racing](usingcurl/connections/happy.md#http-slash-3-racing), [Local port number](usingcurl/connections/local-port.md#local-port-number), [Keep alive](usingcurl/connections/keepalive.md#keep-alive), [Timeouts](usingcurl/timeouts.md#timeouts), [HTTP proxy tunneling](usingcurl/proxies/http.md#http-proxy-tunneling), [MITM proxy](usingcurl/proxies/mitm.md#mitm-proxy), [haproxy](usingcurl/proxies/haproxy.md#haproxy), [TLS](usingcurl/tls.md#tls), [Debugging with TELNET](usingcurl/telnet.md#debugging-with-telnet), [TFTP](usingcurl/tftp.md#tftp), [QUIC](http/versions/http3.md#quic), [HTTPS](http/https.md#https), [Two connections](ftp/twoconnections.md#two-connections), [Connection cache](libcurl/caches.md#connection-cache), [All options](transfers/options/all.md#all-options), [HTTP/3](transfers/conn/how.md#http-slash-3), [Keep alive](transfers/conn/keepalive.md#keep-alive), [connectdata](internals/structs.md#connectdata) + - TCP: [Establish a connection](protocols/network.md#establish-a-connection), [How much do protocols change?](protocols/protocols.md#how-much-do-protocols-change), [DICT](protocols/curl.md#dict), [TCP vs UDP](cmdline/urls/port.md#tcp-vs-udp), [Available exit codes](cmdline/exitcode.md#available-exit-codes), [Available --write-out variables](usingcurl/verbose/writeout.md#available---write-out-variables), [Multipath TCP](usingcurl/connections/setup.md#multipath-tcp), [Connection timeout](usingcurl/connections/timeout.md#connection-timeout), [HTTP/3 racing](usingcurl/connections/happy.md#http-slash-3-racing), [Local port number](usingcurl/connections/local-port.md#local-port-number), [Keep alive](usingcurl/connections/keepalive.md#keep-alive), [Timeouts](usingcurl/timeouts.md#timeouts), [HTTP proxy tunneling](usingcurl/proxies/http.md#http-proxy-tunneling), [MITM proxy](usingcurl/proxies/mitm.md#mitm-proxy), [haproxy](usingcurl/proxies/haproxy.md#haproxy), [TLS](usingcurl/tls.md#tls), [Debugging with TELNET](usingcurl/telnet.md#debugging-with-telnet), [TFTP](usingcurl/tftp.md#tftp), [QUIC](http/versions/http3.md#quic), [HTTPS](http/https.md#https), [Two connections](ftp/twoconnections.md#two-connections), [Connection cache](libcurl/caches.md#connection-cache), [All options](transfers/options/all.md#all-options), [HTTP/3](transfers/conn/how.md#http-slash-3), [Keep alive](transfers/conn/keepalive.md#keep-alive), [connectdata](internals/structs.md#connectdata) - TELNET: [What protocols does curl support?](protocols/protocols.md#what-protocols-does-curl-support), [TELNET](protocols/curl.md#telnet), [Supported schemes](cmdline/urls/scheme.md#supported-schemes), [Version](cmdline/curlver.md#version), [Available exit codes](cmdline/exitcode.md#available-exit-codes), [TELNET](usingcurl/telnet.md#telnet), [All options](transfers/options/all.md#all-options), [Variables](internals/tests/file-format.md#variables) - testing: [What does curl do?](project/does.md#what-does-curl-do), [Reporting bugs](project/bugs.md#reporting-bugs), [Handling build options](source/options.md#handling-build-options), [Contributing](source/contributing.md#contributing), [Run a local clone](source/web.md#run-a-local-clone), [Separate install](build/separate.md#separate-install), [About HTTP response code "errors"](libcurl-http/responses.md#about-http-response-code-errors), [Debug builds](internals/tests/debug.md#debug-builds), [Test servers](internals/tests/servers.md#test-servers), [Torture](internals/tests/torture.md#torture) - TFTP: [What protocols does curl support?](protocols/protocols.md#what-protocols-does-curl-support), [TFTP](protocols/curl.md#tftp), [Supported schemes](cmdline/urls/scheme.md#supported-schemes), [TCP vs UDP](cmdline/urls/port.md#tcp-vs-udp), [Version](cmdline/curlver.md#version), [Available exit codes](cmdline/exitcode.md#available-exit-codes), [Protocols allowing upload](usingcurl/uploads.md#protocols-allowing-upload), [TFTP](usingcurl/tftp.md#tftp), [All options](transfers/options/all.md#all-options), [Variables](internals/tests/file-format.md#variables), [Test servers](internals/tests/servers.md#test-servers) @@ -454,8 +457,10 @@ - --trace-config: [More data](usingcurl/verbose/trace.md#more-data) - --trace-ids: [Identify transfers and connections](usingcurl/verbose/trace.md#identify-transfers-and-connections) - --trace-time: [Time stamps](usingcurl/verbose/trace.md#time-stamps) + - Traffic Class: [Type of Service](usingcurl/connections/setup.md#type-of-service) - transfer-encoding: [Pass on transfer encoding](http/response.md#pass-on-transfer-encoding), [Chunked encoded POSTs](http/post/chunked.md#chunked-encoded-posts) - trurl: [What does curl do?](project/does.md#what-does-curl-do), [trurl](cmdline/urls/trurl.md#trurl) + - Type of Service: [Type of Service](usingcurl/connections/setup.md#type-of-service) ## U @@ -472,7 +477,7 @@ - variables: [No assignments in conditions](source/style.md#no-assignments-in-conditions), [Output variables for globbing](cmdline/urls/globbing.md#output-variables-for-globbing), [Config file](cmdline/configfile.md#config-file), [Variables](cmdline/variables.md#variables), [Error message](cmdline/exitcode.md#error-message), [Write out](usingcurl/verbose/writeout.md#write-out), [Proxy environment variables](usingcurl/proxies/env.md#proxy-environment-variables), [Ciphers](usingcurl/tls/ciphers.md#ciphers), [Proxy environment variables](transfers/conn/proxies.md#proxy-environment-variables), [Preprocessed](internals/tests/file-format.md#preprocessed) - --verbose: [Long options](cmdline/options/long.md#long-options), [Time stamps](usingcurl/verbose/trace.md#time-stamps) - --version: [Version](cmdline/curlver.md#version), [TLS backends](usingcurl/tls/backends.md#tls-backends), [Memory debugging](internals/memory-debugging.md#memory-debugging) - - --vlan-priority: [VLAN](usingcurl/connections/vlan.md#vlan) + - --vlan-priority: [VLAN](usingcurl/connections/setup.md#vlan) - Vulnerability: [Backdoors and supply chain risks](project/security.md#backdoors-and-supply-chain-risks), [Vulnerability handling](source/reportvuln.md#vulnerability-handling) ## W From d30da2d20395b12a356ce73e81f52d21068cc6cd Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 30 Dec 2024 16:48:32 +0100 Subject: [PATCH 3/4] fixup spelling --- usingcurl/connections/setup.md | 7 ++++--- wordlist.txt | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/usingcurl/connections/setup.md b/usingcurl/connections/setup.md index 20c7d83e1..f9a3c8d49 100644 --- a/usingcurl/connections/setup.md +++ b/usingcurl/connections/setup.md @@ -22,9 +22,10 @@ The IPv4 protocol header has a "Type of Service (TOS)" field. It is called to either a numerical value between zero and 255, or by using one of the recognized names: -CS0, CS1, CS2, CS3, CS4, CS5, CS6, CS7, AF11, AF12, AF13, AF21, AF22, AF23, -AF31, AF32, AF33, AF41, AF42, AF43, EF, VOICE-ADMIT, ECT1, ECT0, CE, LE, -LOWCOST, LOWDELAY, THROUGHPUT, RELIABILITY, MINCOST + CS0, CS1, CS2, CS3, CS4, CS5, CS6, CS7, AF11, AF12, AF13, + AF21, AF22, AF23, AF31, AF32, AF33, AF41, AF42, AF43, EF, + VOICE-ADMIT, ECT1, ECT0, CE, LE, LOWCOST, LOWDELAY, + THROUGHPUT, RELIABILITY, MINCOST Example: diff --git a/wordlist.txt b/wordlist.txt index 9216d9105..4e5f0030b 100644 --- a/wordlist.txt +++ b/wordlist.txt @@ -325,6 +325,7 @@ MITM mk Monnerat MPL +MPTCP MQTT mqtt mqtts @@ -338,6 +339,7 @@ MSYS msys mTLS multicwd +Multipath MultiSSL mumbo mutex @@ -537,6 +539,7 @@ TODO Tomtom toolchains Torre +TOS TrackMemory trurl Tse @@ -600,4 +603,3 @@ Zakrzewski Zitzmann zlib zsh - From c26a7b602f2be8e4d2d68bd323038d46a1bbd1e6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 30 Dec 2024 16:49:38 +0100 Subject: [PATCH 4/4] fixup link --- usingcurl/connections/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usingcurl/connections/README.md b/usingcurl/connections/README.md index 8b32b989a..dde3d158c 100644 --- a/usingcurl/connections/README.md +++ b/usingcurl/connections/README.md @@ -9,7 +9,7 @@ For ordinary command line usage, operating on a URL, these are details which are taken care of under the hood, and which you can mostly ignore. But at times you might find yourself wanting to tweak the specifics… -* [VLAN](vlan.md) +* [Setup](setup.md) * [Name resolve tricks](name.md) * [Connection timeout](timeout.md) * [Happy Eyeballs](happy.md)