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