TIdFTP with HTTP Proxy issue [Delphi 10.2/Indy 10.6.2.5366] - Printable Version +- Atozed Forums (https://www.atozed.com/forums) +-- Forum: Indy (https://www.atozed.com/forums/forum-8.html) +--- Forum: Indy General Discussion (https://www.atozed.com/forums/forum-9.html) +--- Thread: TIdFTP with HTTP Proxy issue [Delphi 10.2/Indy 10.6.2.5366] (/thread-1038.html) |
TIdFTP with HTTP Proxy issue [Delphi 10.2/Indy 10.6.2.5366] - chinaid - 04-22-2019 //init TIdFTP f := TIdFTP.Create(self); f.Passive := true; //init Proxy cProxy := TIdConnectThroughHttpProxy.Create(); cProxy.Host := '123.123.123.123'; cProxy.Port := '3128'; cProxy.Enabled := true; //init IOHandler LHandler := TIdIOHandlerSocket.Create(); LHandler.TransparentProxy := cProxy; f.IOHandler := LHandler; //ftp server f.host := 'ftp.server.com'; f.username = 'root'; f.Password := 'abcd1234'; after f.Connect will get an error: "Abstract Error", if does not use proxy it works fine. for sure, the proxy server/ftp server are both working fine. sorry, I am not good at Indy, I have checked many documents/websites and made this code, but it looks not working for me, does someone can share some advise or document to me, thanks in advance. RE: TIdFTP with HTTP Proxy issue [Delphi 10.2/Indy 10.6.2.5366] - rlebeau - 04-23-2019 (04-22-2019, 08:22 AM)chinaid Wrote: after f.Connect will get an error: "Abstract Error" TIdIOHandlerSocket is an abstract class, you can't instantiate it directly. You need to use TIdIOHandlerStack instead, which derives from TIdIOHandlerSocket. Code: LHandler := TIdIOHandlerStack.Create(f); |