Artifactspublic-v0

curl

master
ply4 git calls168 ms288 KiB2 cachedprotocol v2
103 lines2.7 KiBRaw

NAME

CURLOPT_NOPROXY - disable proxy use for specific hosts

SYNOPSIS

c
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NOPROXY, char *noproxy);

DESCRIPTION

Pass a pointer to a null-terminated string. The string consists of a comma separated list of hostnames that do not require a proxy to get reached, even if one is specified. The only wildcard available is a single * character, which matches all hosts, and effectively disables the proxy. Each name in this list is matched as either a domain which contains the hostname, or the hostname itself. For example, "ample.com" would match ample.com, ample.com:80, and www.ample.com, but not www.example.com or ample.com.org.

Setting the noproxy string to "" (an empty string) explicitly enables the proxy for all hostnames, even if there is an environment variable set for it.

Enter IPv6 numerical addresses in the list of hostnames without enclosing brackets:

"example.com,::1,localhost"

IP addresses specified to this option can be provided using CIDR notation: an appended slash and number specifies the number of "network bits" out of the address to use in the comparison. For example "192.168.0.0/16" would match all addresses starting with "192.168".

To use international hostnames in this list, add the punycode version of the hostname.

The application does not have to keep the string around after setting this option.

Using this option multiple times makes the last set string override the previous ones. Set it to NULL to disable its use again.

Environment variables

If there is an environment variable called no_proxy (or NO_PROXY), it is used if the CURLOPT_NOPROXY(3) option is not set. It works exactly the same way.

DEFAULT

NULL

%PROTOCOLS%

EXAMPLE

c
int main(void)
{
  CURL *curl = curl_easy_init();
  if(curl) {
    CURLcode result;
    /* accept various URLs */
    curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
    /* use this proxy */
    curl_easy_setopt(curl, CURLOPT_PROXY, "http://proxy.example:80");
    /* ... but make sure this hostname is not proxied */
    curl_easy_setopt(curl, CURLOPT_NOPROXY, "www.example.com");
    result = curl_easy_perform(curl);
    curl_easy_cleanup(curl);
  }
}

HISTORY

CIDR format support was added in 7.86.0.

%AVAILABILITY%

RETURN VALUE

curl_easy_setopt(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see libcurl-errors(3).

1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Title: CURLOPT_NOPROXY
5Section: 3
6Source: libcurl
7Protocol:
8 - All
9See-also:
10 - CURLOPT_PROXY (3)
11 - CURLOPT_PROXYAUTH (3)
12 - CURLOPT_PROXYTYPE (3)
13Added-in: 7.19.4
14---
16# NAME
18CURLOPT_NOPROXY - disable proxy use for specific hosts
20# SYNOPSIS
22~~~c
23#include <curl/curl.h>
25CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NOPROXY, char *noproxy);
26~~~
28# DESCRIPTION
30Pass a pointer to a null-terminated string. The string consists of a comma
31separated list of hostnames that do not require a proxy to get reached, even
32if one is specified. The only wildcard available is a single * character,
33which matches all hosts, and effectively disables the proxy. Each name in this
34list is matched as either a domain which contains the hostname, or the
35hostname itself. For example, "ample.com" would match ample.com, ample.com:80,
36and www.ample.com, but not www.example.com or ample.com.org.
38Setting the *noproxy* string to "" (an empty string) explicitly enables the
39proxy for all hostnames, even if there is an environment variable set for it.
41Enter IPv6 numerical addresses in the list of hostnames without enclosing
42brackets:
44 "example.com,::1,localhost"
46IP addresses specified to this option can be provided using CIDR notation: an
47appended slash and number specifies the number of "network bits" out of the
48address to use in the comparison. For example "192.168.0.0/16" would match all
49addresses starting with "192.168".
51To use international hostnames in this list, add the punycode version of the
52hostname.
54The application does not have to keep the string around after setting this
55option.
57Using this option multiple times makes the last set string override the
58previous ones. Set it to NULL to disable its use again.
60# Environment variables
62If there is an environment variable called **no_proxy** (or **NO_PROXY**),
63it is used if the CURLOPT_NOPROXY(3) option is not set. It works exactly
64the same way.
66# DEFAULT
68NULL
70# %PROTOCOLS%
72# EXAMPLE
74~~~c
75int main(void)
77 CURL *curl = curl_easy_init();
78 if(curl) {
79 CURLcode result;
80 /* accept various URLs */
81 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
82 /* use this proxy */
83 curl_easy_setopt(curl, CURLOPT_PROXY, "http://proxy.example:80");
84 /* ... but make sure this hostname is not proxied */
85 curl_easy_setopt(curl, CURLOPT_NOPROXY, "www.example.com");
86 result = curl_easy_perform(curl);
87 curl_easy_cleanup(curl);
88 }
90~~~
92# HISTORY
94CIDR format support was added in 7.86.0.
96# %AVAILABILITY%
98# RETURN VALUE
100curl_easy_setopt(3) returns a CURLcode indicating success or error.
102CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
103libcurl-errors(3).
Diagnostics4 git calls · 168 ms
CallStatusSizeTime0168 ms
discover200152 B2 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=2
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 · hit2 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=2
git.response.bytes=293470
git.response.cache=HIT
git.response.duration_ms=2
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
fetch2001.4 KiB163 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=163
git.response.bytes=1479
git.response.cache=MISS
git.response.duration_ms=163
git.fetch.wants=244f68a5b98b499ea6f5e4ad70dff6138d690fab
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=1479
git.pkt.payload.max=1458
git.sideband.band1.bytes=1457
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
a5e356f769542c38
Request
648c6957…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format