Problem connecting using HTTP proxy.

0 votes
asked Mar 22, 2012 by Rebex KB (8,430 points)
edited Mar 22, 2012

I am trying to connect through HTTP proxy and it does not work! What is wrong?

Applies to: Rebex FTP/SSL

1 Answer

0 votes
answered Mar 22, 2012 by Rebex KB (8,430 points)
edited Mar 22, 2012

Make sure your HTTP proxy supports HTTP CONNECT method. If it doesn't, it will not work neither FTP for .NET nor FTP/SSL for .NET. Try using Socks4/Socks5 proxy instead.

There are two ways of making FTP servers accessible through HTTP proxy:

  • The first one is a special HTTP CONNECT method, which makes it possible to connect to virtually any port on any server on the Internet and therefore it can also be used to connect to FTP servers. After a connection is made, it is possible to communicate with the FTP server using the FTP protocol - the proxy only initializes the connection and does not affect the traffic. Rebex FTP for .NET and Rebex FTP/SSL for .NET does support this kind of proxies - this is the HttpConnect type proxy.

  • The second one is just an extension of a regular HTTP GET requests that makes it possible to access FTP URIs. Communication between the proxy and the FTP server is using the FTP protocol, but the communication between the proxy and a client on a computer on the local network is actually HTTP, not FTP. This is a huge limitation - only basic functionality of the FTP server can be utilized this way.

If you absolutely need to use HTTP GET, you do not need a FTP component - some decent HTTP component would be a better choice.