cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: TUNNELING

From: raoul cridlig <rcridlig_at_yahoo.fr>
Date: Mon, 7 Jan 2002 14:31:56 +0100 (CET)

Hi,
Here is my code: (what' wrong ?)

file to download:plouf
ftp server:192.168.1.1
proxy HTTP: proxyname PORT:port

curl_global_init(CURL_GLOBAL_ALL);
curl_easy_setopt(curl, CURLOPT_USERPWD, "toto:titi");
ftpfile = fopen("/home/plouf", "w");
curl_easy_setopt(curl, CURLOPT_URL,
"ftp://192.168.200.138/tata/plouf");
curl_easy_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, TRUE);
curl_easy_setopt(curl, CURLOPT_PROXY, proxyname);
curl_easy_setopt(curl, CURLOPT_PROXYPORT, port);
curl_easy_setopt(curl, CURLOPT_FILE, ftpfile);
res = curl_easy_perform(curl);

Result:

* Establish HTTP proxy tunnel to 192.168.1.1:21
> CONNECT 192.168.1.1:21 HTTP/1.0
 
< HTTP/1.0 403 Forbidden
< Server: Squid/2.3.STABLE4
< Mime-Version: 1.0
< Date: Mon, 07 Jan 2002 13:24:34 GMT
< Content-Type: text/html
< Content-Length: 705
< Expires: Mon, 07 Jan 2002 13:24:34 GMT
< X-Squid-Error: ERR_ACCESS_DENIED 0
< X-Cache: MISS from www-cache.datasystem.fr
< Proxy-Connection: close
<
* Closing connection #0

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Courrier : http://courrier.yahoo.fr
Received on 2002-01-07