Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Dec : idfTP and Socks problem
| Subject: | idfTP and Socks problem |
| Posted by: | "Richard" (ritchie8..@yahoo.com) |
| Date: | Sat, 8 Dec 2007 01:23:29 |
HEllo!
My code is simple: (Latest Indy 10 snapshot)
FTP:=TidFTP.Create(nil);
try
FHandlerStack:= TIdIOHandlerStack.Create(FTP);
FSocks:= TIdSocksInfo.Create(FTP);
FSocks.Host:= 'some server';
FSocks.Password:= 'some password';
FSocks.Port:= some_port;
FSocks.Username:= 'some id';
FSocks.Version:= svSocks5 ;
FTP.IOHAndler:= FHandlerStack;
FHandlerStack.TransparentProxy:= FSocks;
FTP.Host:= 'etc, etc'''' // I now set the rest of the FTP settings
FTP.Connect();
finally
FreeAndNil(FTP);
end;
Now, this works perfectly... well, too perfect. Setting a bad proxy server
name or port just connects anyway... It's like if the FTP is ignoring the
TransparentProxy settings. Why is that?
This same procedure works like expected if I use a TidTCPClient instead. In
that case, the client throws an exception if there are problems connecting
with the Proxy, but the FTP just works "fine".
What am I doing wrong here?