EldoS | Feel safer!

Software components for data protection, secure storage and transfer

FTP through HTTP Proxy

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
#6108
Posted: 05/05/2008 04:13:13
by Laboratoire EAI  (Standard support level)
Joined: 01/31/2007
Posts: 8

Hi,

I use SBB 6.0 and I would like to know :

How Do I can use FTP through HTTP proxy ?

I would like to upload a file to my FTP Server and I have to pass through a HTTP Proxy Squid. When I configure my IE on the proxy I can send my file by FTP. So, the proxy can pass FTP protocol.

Thanks,

LaboEAI.
#6109
Posted: 05/05/2008 04:37:08
by Eugene Mayevski (EldoS Corp.)

ElSimpleFTPSClient doesn't support HTTP proxy and there are no plans for this.
You can try using ElHTTPSClient - setup proxy parameters, then use Put() method and pass the FTP URL and your data as parameters.


Sincerely yours
Eugene Mayevski
#6110
Posted: 05/05/2008 04:55:37
by Laboratoire EAI  (Standard support level)
Joined: 01/31/2007
Posts: 8

Thanks for replying,

I try to modify Delphi\SSLBlackbox\HTTP\FileUpload\UploadFile.exe demo to do that

I setup the proxy properly before

but when I do a ElHTTPSClient.put('ftp://myftpserver/upload/filename.txt',FileStream);

This error raise :

'Unsupported protocol name (ftp) specified in URL';

LaboEAI
#6111
Posted: 05/05/2008 05:23:04
by Eugene Mayevski (EldoS Corp.)

As you are using VCL edition, you can do the following:

1) Open ElHTTPSClient.pas and find TElHTTPSClient.InitiateRequest() method
2) Comment out the lines which check the protocol. The lines are
Code
  if (UpperCase(Protocol) <> 'HTTP') and (UpperCase(Protocol) <> 'HTTPS') then
    raise EElHTTPSClientError.Create({$ifdef DELPHI_NET}System.String.{$endif}Format(SInvalidProtocol, [Protocol]));

3) recompile the package and/or the application.


Sincerely yours
Eugene Mayevski
#6112
Posted: 05/05/2008 09:08:53
by Laboratoire EAI  (Standard support level)
Joined: 01/31/2007
Posts: 8

Hi,

I modify the SSB source code as you wish so I have no exception.

I try this :

HttpClient.put('ftp://username:password@­myftpserver/upload/filena­me.txt',ContentText);

In my proxy server log I see that the username en password is good for ftp put the ftp server don't understand to upload file because the STOR command is not pass. The connection is freeze for 30 secs and the connection is lost.


LaboEAI

#6113
Posted: 05/05/2008 09:39:55
by Eugene Mayevski (EldoS Corp.)

I am not sure that I understand you here. Is STOR command not sent by the proxy or the command is sent but the server doesn't process it correctly? In any case this seems to be a problem of the proxy.

You can also try to use simple POST command instead of PUT. Maybe POST will work ...


Sincerely yours
Eugene Mayevski
#6114
Posted: 05/05/2008 09:50:22
by Laboratoire EAI  (Standard support level)
Joined: 01/31/2007
Posts: 8

Sorry for my bad english...

When I make a put, I view in the proxy log that the authentification is good but the ftp only understand to change current dir (the stream passed in parms is not interpreted) and I think that it miss a STOR command.

LaboEAI
#6116
Posted: 05/05/2008 10:02:52
by Eugene Mayevski (EldoS Corp.)

As said, try POST instead of PUT.


Sincerely yours
Eugene Mayevski
#6117
Posted: 05/05/2008 11:16:51
by Laboratoire EAI  (Standard support level)
Joined: 01/31/2007
Posts: 8

Hi,

I try the POST instead of PUT and I have the same result the connection freeze during 30 sec and the connection is lost.

LaboEAI
#6118
Posted: 05/05/2008 11:53:52
by Eugene Mayevski (EldoS Corp.)

Try GETting some file from the FTP - this will let us understand whether the proxy performs correctly at all.


Sincerely yours
Eugene Mayevski
Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.

Reply

Statistics

Topic viewed 2617 times

Number of guests: 2, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!