cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Few Proxy Questions

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 29 Aug 2003 11:07:24 +0200 (CEST)

On Thu, 28 Aug 2003, Matt Veenstra wrote:

> CURLOPT_PROXY works for HTTP proxies according to the docs. Is there a call
> for FTP, and Gopher proxies?

Nope. There is no built-in support for such proxies. Most often, you can use
FTP-proxies anyway by some clever use of the QUOTE option.

> Mac OS X provides separate proxies for HTTPS so I just strncmp the beginning
> of the URL for http:// or https:// and call the same CURLOPT_PROXY with the
> proper HTTP or HTTPS from the system. Is this fine?

Yes, it sounds like the right way to do it.

> I assume FTP could be added very easily since it is uses the default
> environment variables on Linux if they are set. Is this somewhere and did I
> miss this?

The proxy support in libcurl for FTP is only to allow you to do FTP operations
over a HTTP proxy.

> If a SOCKS proxy is defined in the Mac OS X system should I use this value
> in CURLOPT_PROXY and set CURLOPT_PROXYTYPE accordingly?

Yes.

> What if HTTPS proxy is also defined. What happens in this case? Can I set
> both proxy types.

How can you have both? libcurl only supports HTTP proxy (which is a type of
proxy, working for multiple protocols such as HTTP, HTTPS and FTP) *or* a
socks proxy.

> Gopher is near dead so it is not so important.

I agree. I also believe that Gopher is not currently workin 100% in libcurl.

> I will pass along a full working sample once I get these few items sorted
> out. Everything but everything is working great.

Nice!

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-08-29