curl-library
LibCurlNet: httpproxytunnel gets timeout
Date: Tue, 5 May 2009 11:47:35 +0200
Hi all,
I'm using curl-7.19.4 (win 32) and libcurlnet-1_3 in my .net win service
in order to send/receive/delete files from a FTP server in the internet.
I'm dealing with an isa server.
Since it seems that delete and upload don't work behind our http proxy,
I tried to use httpproxytunnel and here's my code:
Curl.GlobalInit((int)CURLinitFlag.CURL_GLOBAL_ALL);
myEasy = new Easy();
//write function
Easy.WriteFunction wf = new Easy.WriteFunction(OnWriteListData);
myEasy.SetOpt(CURLoption.CURLOPT_WRITEFUNCTION, wf);
//debug function
Easy.DebugFunction df = new Easy.DebugFunction(OnDebug);
myEasy.SetOpt(CURLoption.CURLOPT_DEBUGFUNCTION, df);
//other settings
myEasy.SetOpt(CURLoption.CURLOPT_VERBOSE, true);
myEasy.SetOpt(CURLoption.CURLOPT_HTTPPROXYTUNNEL, true);
//proxy settings
myEasy.SetOpt(CURLoption.CURLOPT_PROXY, strProxyServer);
myEasy.SetOpt(CURLoption.CURLOPT_PROXYPORT, "443");
myEasy.SetOpt(CURLoption.CURLOPT_PROXYUSERPWD, strProxyAccount);
myEasy.SetOpt(CURLoption.CURLOPT_PROXYAUTH, CURLhttpAuth.CURLAUTH_NTLM);
//ftp server settings
myEasy.SetOpt(CURLoption.CURLOPT_URL, strFTPServer + strFTPFolder);
myEasy.SetOpt(CURLoption.CURLOPT_PORT, strFTPPort);
myEasy.SetOpt(CURLoption.CURLOPT_USERPWD, strFTPAccount);
//Get folder list
myEasy.SetOpt(CURLoption.CURLOPT_FTPLISTONLY, true);
CURLcode result = myEasy.Perform();
I always got the error:
About to connect() to proxy.domain.com port 443
Trying 10.10.82.13...
Timed out
couldn't connect to host
Closing connection #0
Do you have any ideas?
I tried also to add these lines:
myEasy.SetOpt(CURLoption.CURLOPT_FTP_SSL, CURLftpSSL.CURLFTPSSL_ALL);
myEasy.SetOpt(CURLoption.CURLOPT_FTPSSLAUTH,
CURLftpAuth.CURLFTPAUTH_SSL);
with the same result.
Thanks a lot!
Received on 2009-05-05