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