Artifactspublic-v0

curl

master
ply4 git calls28 ms288 KiB3 cachedprotocol v2
40 lines1.3 KiBRaw

--connect-to

For a request intended for the HOST1:PORT1 pair, connect to HOST2:PORT2 instead. This option is only used to establish the network connection. It does NOT affect the hostname/port number that is used for TLS/SSL (e.g. SNI, certificate verification) or for the application protocols.

HOST1 and PORT1 may be empty strings, meaning any host or any port number. HOST2 and PORT2 may also be empty strings, meaning use the request's original hostname and port number.

A hostname specified to this option is compared as a string, so it needs to match the name used in the request URL. It can be either numerical such as 127.0.0.1 or the full hostname such as example.org.

Example: redirect connects from the example.com hostname to 127.0.0.1 independently of port number:

curl --connect-to example.com::127.0.0.1: https://example.com/

Example: redirect connects from all hostnames to 127.0.0.1 independently of port number:

curl --connect-to ::127.0.0.1: http://example.com/
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 host2 instead of host1
7Added: 7.49.0
8Category: connection dns
9Multi: append
10See-also:
11 - resolve
12 - header
13Example:
14 - --connect-to example.com:443:example.net:8443 $URL
15---
17# `--connect-to`
19For a request intended for the `HOST1:PORT1` pair, connect to `HOST2:PORT2`
20instead. This option is only used to establish the network connection. It does
21NOT affect the hostname/port number that is used for TLS/SSL (e.g. SNI,
22certificate verification) or for the application protocols.
24`HOST1` and `PORT1` may be empty strings, meaning any host or any port number.
25`HOST2` and `PORT2` may also be empty strings, meaning use the request's
26original hostname and port number.
28A hostname specified to this option is compared as a string, so it needs to
29match the name used in the request URL. It can be either numerical such as
30`127.0.0.1` or the full hostname such as `example.org`.
32Example: redirect connects from the example.com hostname to 127.0.0.1
33independently of port number:
35 curl --connect-to example.com::127.0.0.1: https://example.com/
37Example: redirect connects from all hostnames to 127.0.0.1 independently of
38port number:
40 curl --connect-to ::127.0.0.1: http://example.com/
Diagnostics4 git calls · 28 ms
CallStatusSizeTime028 ms
discover200152 B3 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=3
git.response.bytes=152
git.server.agent=gitty/1.0
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch object-format
git.server.fetch=shallow filter sideband-all
git.protocol.version=2
git.pkt.frames=8
git.pkt.data=6
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=152
git.pkt.payload.max=34
ls-refs200149 B · hit3 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=3
git.response.bytes=149
git.response.cache=HIT
git.response.duration_ms=3
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=149
git.pkt.payload.max=78
git.ls_refs.count=2
git.ls_refs.head=refs/heads/master
fetchblob:none · deepen 10200287 KiB · hit3 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=3
git.response.bytes=293470
git.response.cache=HIT
git.response.duration_ms=3
git.fetch.filter=blob:none
git.fetch.filter.requested=tree:0
git.fetch.filter.fallback=blob:none
git.fetch.filter.learned=false
git.fetch.wants=31c911efe5652725e930f4d2e60c9060e5f6646d
git.fetch.haves.count=0
git.fetch.deepen=10
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=10
git.pkt.data=8
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=293470
git.pkt.payload.max=65516
git.sideband.band1.bytes=293354
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=87
git.pack.bytes=293354
git.pack.ofs_delta=0
git.pack.ref_delta=1
git.pack.chain.max=1
git.pack.trailer=6a646bcda6740bab42e321b51998b52ea15146c0
git.pack.full=86
Open pack map
fetch200723 B · hit22 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=22
git.response.bytes=723
git.response.cache=HIT
git.response.duration_ms=22
git.fetch.wants=c7378318e2b0bfb2c5472b4c6314d14b06635847
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=723
git.pkt.payload.max=702
git.sideband.band1.bytes=701
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0

Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.

Remote
https://5ad2236b39de4c8bd8f6270ea63f3ea9.artifacts.cloudflare.net/git/public-v0/curl.git
Ref
refs/heads/master
Commit
31c911efe5652725e930f4d2e60c9060e5f6646d
cf-ray
a5e346f75af9f4d4
Request
f07aeec5…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format