cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl disable proxy for all ips

From: Peter Gal <galpeter_at_inf.u-szeged.hu>
Date: Mon, 08 Jul 2013 09:52:18 +0200

On 2013-07-08 08:41, Indtiny s wrote:
> *Hi,*
> *I am running some C curl application on ubuntu . I want to remove the
> proxy setting for curl for all th ips , I could do it by for known ips
> using (curl,CURLOPT_NOPROXY,"IP") , Here I do not want to hard code the
> IP , I just want to by pass the proxy for all curl request .. How to by
> pass the proxy in curl ?*
> *

Hi,

I think this is what you are looking for (from the docs
http://curl.haxx.se/libcurl/c/curl_easy_setopt.html ):

CURLOPT_NOPROXY:
"The only wildcard available is a single * character, which matches all
hosts, and effectively disables the proxy."

or:

CURLOPT_PROXY:
"Setting the proxy string to "" (an empty string) will explicitly
disable the use of a proxy, even if there is an environment variable set
for it. "

Regards,
  Peter
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-07-08