cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl and socks5

From: Andy Cedilnik <andy.cedilnik_at_kitware.com>
Date: 13 Jan 2003 16:19:56 -0500

Hi All,

Great work guys! I got libcurl working with socks5. Here is a sample
program:

#include "curl/curl.h"

int main(void)
{
  CURL *curl;
  CURLcode res;

  curl_global_init(CURL_GLOBAL_DEFAULT);
  curl = curl_easy_init();
  if(curl) {
    curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
    curl_easy_setopt(curl, CURLOPT_PROXY, "proxy");
    curl_easy_setopt(curl, CURLOPT_URL,
"http://www.cmake.org/HTML/Index.html");
    res = curl_easy_perform(curl);

    /* always cleanup */
    curl_easy_cleanup(curl);
  }
  return 0;
}

Cool. Now I need ftp over socks. What is the state of ftp code?

Thanks.

                                Andy

On Mon, 2003-01-13 at 01:33, Daniel Stenberg wrote:
> On Fri, 10 Jan 2003, Andy Cedilnik wrote:
>
> > I was trying to use libcurl with socks5 and am having slight problem. The
> > socks server is responding everytime the following HTML:
>
> [snip]
>
> > Is there a trick to tell libcurl that the server is socks and not regular
> > ftp proxy?
>
> If you would tell us a) how you attempted to use it and b) what libcurl
> version you're using, it might give us a better chance to offer you a fitting
> answer.
>
> To use a socks proxy, use CURLOPT_PROXYTYPE as documented.
>
> Also, libcurl has no particular support for "ftp proxy".

-------------------------------------------------------
This SF.NET email is sponsored by: FREE SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
Received on 2003-01-13