cURL / Mailing Lists / curl-library / Single Mail

curl-library

Specifying "No Proxy For" domains

From: Holger Rauch <Holger.Rauch_at_heitec.de>
Date: Mon, 22 Jul 2002 11:42:48 +0200 (CEST)

Hi!

I'm new to libcurl and I'm wondering whether it's possible to specify
domains for which no proxy should be used (analogous to the "No Proxy
For" input field in Netscape)? I'm using curl/libcurl version
7.9.8. Here's my code, heavily based on the example provided. Maybe there
is an option that I've overlooked?

/**
 * Used to fetch URL data from a local site
 * but this time using a proxy, so that we can obtain stuff
 * from the Internet
 * ??? How do I make it known to this lib that no proxy is supposed
 * to be used for .heitec.de, .heitec.net, and localhost ???
 */

#include <stdio.h>
#include <curl/curl.h>

int
main( int argc,
      char** argv )
{
  CURL* curl = NULL;
  CURLcode res = NULL;

  if ( argc == 2 ) {
   curl = curl_easy_init();
    if ( curl ) {
      curl_easy_setopt( curl,
                        CURLOPT_URL,
                        argv[1] );
      curl_easy_setopt( curl,
                        CURLOPT_PROXY,
                        "http://proxy.heitec.net:8080" );
      res = curl_easy_perform( curl );
      curl_easy_cleanup( curl );
    }
  } else {
    printf( "Please pass URL as an argument\n" );
  }

  return 0;
}

Thanks a lot for any help!

Greetings,

        Holger

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2002-07-22