curl/docs
Stefan Eissing 73daec6620
lib: transfer origin and proxy handling
Add `data->state.origin` as the origin the transfer is sending the
current request to/gets the response from. Use it for request specific
properties like authentication, hsts and cookie handling, etc.

Unless talking to a forwarding HTTP proxy (e.g. not tunneling),
`data->state.origin` and `conn->origin` are the same.

With a forwarding HTTP proxy in play, `conn->origin` is set to
`conn->http_proxy.peer` and `conn->bits.origin_is_proxy` (a new bit) is
set.

Remove the connection bits, now replaced with:

* `conn->bits.socksproxy` -> `conn->socks_proy.peer`
* `conn->bits.httpproxy` -> `conn->http_proy.peer`
* `conn->bits.proxy` -> `(conn->socks_proy.peer || conn->http_proy.peer`)
* `conn->bits.tunnel_proxy` -> (`conn->http_proy.peer && !conn->bits.origin_is_proxy`)
* `(conn->bits.httpproxy && !conn->bits.tunnel_proxy)` -> `conn->bits.origin_is_proxy`

Rename `noproxy.[ch]` to `proxy.[ch]`. Move the connection proxy setup
code from `url.c` to `proxy.c`.

Remove `data->info.conn_remote_port` as no one uses it.

Add test_40_02b for a SOCKS connection to a forwarding HTTPS proxy.

Update internal documentation about peers and creds.

Closes #21967
2026-06-12 23:52:00 +02:00
..
cmdline-opts config2setopts: use default protocol properly 2026-06-12 12:57:15 +02:00
examples tidy-up: add spaces around equal operators where missing 2026-06-11 19:52:01 +02:00
internals lib: transfer origin and proxy handling 2026-06-12 23:52:00 +02:00
libcurl tidy-up: add spaces around equal operators where missing 2026-06-11 19:52:01 +02:00
tests tidy-up: miscellaneous 2026-06-09 11:07:55 +02:00
.gitignore
ALTSVC.md
BINDINGS.md tidy-up: miscellaneous 2026-06-05 16:57:38 +02:00
BUG-BOUNTY.md BUG-BOUNTY.md: minor rephrase to say there is no bug bounty 2026-03-10 17:34:08 +01:00
BUGS.md
CIPHERS-TLS12.md
CIPHERS.md tidy-up: miscellaneous 2026-05-27 16:53:57 +02:00
CMakeLists.txt build: stop building and installing runtests.1 and testcurl.1 2026-04-28 09:07:27 +02:00
CODE_OF_CONDUCT.md
CODE_REVIEW.md tidy-up: miscellaneous 2026-06-09 11:07:55 +02:00
CONTRIBUTE.md tidy-up: miscellaneous 2026-05-27 16:53:57 +02:00
curl-config.md
CURL-DISABLE.md lib: make SMB support opt-in 2026-03-22 11:55:39 +01:00
CURLDOWN.md tidy-up: sort TLS backends, distros, alphabetically 2026-05-11 11:57:25 +02:00
DEPRECATE.md DEPRECATE.md: fix copy-and-paste mistaken subtitles 2026-03-26 11:06:25 +01:00
DISTROS.md
EARLY-RELEASE.md
ECH.md tidy-up: sort TLS backends, distros, alphabetically 2026-05-11 11:57:25 +02:00
EXPERIMENTAL.md build: say Quiche support is experimental, where missing 2026-06-01 22:33:57 +02:00
FAQ.md tidy-up: miscellaneous 2026-06-05 16:57:38 +02:00
FEATURES.md
GOVERNANCE.md
HELP-US.md
HISTORY.md tidy-up: miscellaneous 2026-05-20 00:50:43 +02:00
HSTS.md hsts: accept 10K entries in the list 2026-04-02 10:22:35 +02:00
HTTP-COOKIES.md
HTTP3.md tidy-up: git options, ECH, HTTP/3 documentation 2026-04-25 13:59:20 +02:00
HTTPSRR.md docs: tidy-up scheme references 2026-05-19 16:55:45 +02:00
INFRASTRUCTURE.md docs: tidy-up scheme references 2026-05-19 16:55:45 +02:00
INSTALL
INSTALL-CMAKE.md build: say Quiche support is experimental, where missing 2026-06-01 22:33:57 +02:00
INSTALL.md tidy-up: sort TLS backends, distros, alphabetically 2026-05-11 11:57:25 +02:00
INTERNALS.md tidy-up: miscellaneous 2026-06-11 19:48:07 +02:00
IPFS.md
KNOWN_BUGS.md KNOWN_BUGS: Digest does not care for 'domain' 2026-06-02 11:17:48 +02:00
KNOWN_RISKS.md progress: count amount of data "delivered" to application 2026-03-21 23:21:55 +01:00
MAIL-ETIQUETTE.md badwords: avoid 'simply' 2026-03-10 19:34:06 +01:00
Makefile.am creds: hold credentials 2026-05-12 16:05:15 +02:00
MANUAL.md docs: tidy-up scheme references 2026-05-19 16:55:45 +02:00
mk-ca-bundle.md
options-in-versions HTTP/3: add proxy CONNECT and MASQUE CONNECT-UDP support (ngtcp2 QUIC) 2026-05-27 08:49:53 +02:00
README.md
RELEASE-PROCEDURE.md
ROADMAP.md
runtests.md badwords: avoid 'simply' 2026-03-10 19:34:06 +01:00
RUSTLS.md tidy-up: miscellaneous 2026-05-27 16:53:57 +02:00
SECURITY-ADVISORY.md SECURITY-ADVISORY.md: expand 2026-06-11 10:09:06 +02:00
SPONSORS.md
SSL-PROBLEMS.md
SSLCERTS.md SSLCERTS: document 8.19.0 default Native CA builds (Windows) 2026-05-16 11:55:59 +02:00
testcurl.md
THANKS scripts: catch Credits-to contributors 2026-05-17 22:48:22 +02:00
THANKS-filter tidy-up: miscellaneous 2026-05-16 01:56:17 +02:00
TheArtOfHttpScripting.md badwords: avoid 'simply' 2026-03-10 19:34:06 +01:00
TODO.md docs: tidy-up scheme references 2026-05-19 16:55:45 +02:00
URL-SYNTAX.md URL-SYNTAX: document more URL parsing details 2026-06-02 11:13:50 +02:00
VERIFY.md tidy-up: whitespace 2026-04-27 13:34:27 +02:00
VERSIONS.md tidy-up: miscellaneous 2026-04-30 20:22:23 +02:00
VULN-DISCLOSURE-POLICY.md tidy-up: miscellaneous 2026-06-05 16:57:38 +02:00
wcurl.md spacecheck: check long lines and repeat spaces, fix fallouts 2026-03-25 11:02:08 +01:00

curl logo

Documentation

You find a mix of various documentation in this directory and subdirectories, using several different formats. Some of them are not ideal for reading directly in your browser.

If you would rather see the rendered version of the documentation, check out the curl website's documentation section for general curl stuff or the libcurl section for libcurl related documentation.