Good day. I have the following problem: the code that I am trying to connect to the FTP server is described below. I am in the office, Internet access is carried out through UserGate proxy. And something does not work out for me to break through the proxy, the errors fly out:

1. Project IP.exe raised exception class EIdSocketError with message 'Socket Error # 10061 Connection refused.'. 2. Project IP.exe raised exception class EIdSocketError with message 'Socket Error # 10054 Connection reset by peer.'. - если не указываю тип прокси 

I work with this component for the first time, so do not judge strictly. Perhaps there is some other component for this purpose that works with Delphi XE2? Please help, comrades :)

  IdFtp1.Host := 'xxx.xxx.xxx.xxx'; IdFtp1.Username := 'xxx'; IdFtp1.Password := 'xxx'; IdFtp1.ProxySettings.UserName:= ''; IdFtp1.ProxySettings.Password:= ''; IdFtp1.ProxySettings.ProxyType:= fpcmUserSite; IdFtp1.ProxySettings.Host:= '192.168.2.1'; IdFtp1.ProxySettings.Port:= 5456; IdFTP1.Passive := True; IdFtp1.Connect; 
  • Moreover, for other programs (for example, Total Commander) it is not necessary to specify a login and password for passing a proxy, you just need to select the proxy itself. The server passes all without problems. - teanYCH

1 answer 1

In short, Indy FTP is not friendly with the HTTP proxy - incompatibility of protocols, everything is in order ... Other libraries (which I looked at) cannot configure proxy for FTP elements. And I came to the conclusion that in order to do something like this, you need to have a black programming belt.

  • I do not know who Indy FTP is, but the implementation of a simple non-caching ftp-proxy is not a black belt, but a simple GGM (computational graphic work). - alexlz