xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | c: Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al. |
| 2 | SPDX-License-Identifier: curl |
| 3 | Long: connect-to |
| 4 | Arg: <HOST1:PORT1:HOST2:PORT2> |
| 5 | Help: Connect to host |
| 6 | Added: 7.49.0 |
| 7 | See-also: resolve header |
| 8 | Category: connection |
| 9 | Example: --connect-to example.com:443:example.net:8443 $URL |
| 10 | Multi: append |
| 11 | --- |
| 12 | |
| 13 | For a request to the given HOST1:PORT1 pair, connect to HOST2:PORT2 instead. |
| 14 | This option is suitable to direct requests at a specific server, e.g. at a |
| 15 | specific cluster node in a cluster of servers. This option is only used to |
| 16 | establish the network connection. It does NOT affect the hostname/port that is |
| 17 | used for TLS/SSL (e.g. SNI, certificate verification) or for the application |
| 18 | protocols. "HOST1" and "PORT1" may be the empty string, meaning "any |
| 19 | host/port". "HOST2" and "PORT2" may also be the empty string, meaning "use the |
| 20 | request's original host/port". |
| 21 | |
| 22 | A "host" specified to this option is compared as a string, so it needs to |
| 23 | match the name used in request URL. It can be either numerical such as |
| 24 | "127.0.0.1" or the full host name such as "example.org". |