代码如下:
procedure TForm1.connectFTP();
var
arraystr : ArrayString;begin
setlength(arraystr,9);
if not idftp1.Connected thenarraystr := readServerinfo();
IdFTP1.Host := arraystr[0];
idftp1.Port:= strtoint(arraystr[1]);
idftp1.Username := arraystr[2];
idftp1.Password := arraystr[3];
ftpip:=arraystr[0];
if arraystr[8] = 'isUseProxy=true' then
  begin
    showmessage('使用代理访问ftp server');    idftp1.IOHandler:=IdIOHandlerSocket1;
    IdIOHandlerSocket1.SocksInfo:=IdSocksInfo1;
    IdSocksInfo1.Version:=svSocks5;
    IdSocksInfo1.Host:=arraystr[4];
    IdSocksInfo1.Port:=strtoint(arraystr[5]);
    IdSocksInfo1.Username:=arraystr[6];
    IdSocksInfo1.Password:=arraystr[7];    {
    idftp1.ProxySettings.Host:=arraystr[4];
    idftp1.ProxySettings.Port:=strtoint(arraystr[5]);
    idftp1.ProxySettings.UserName:=arraystr[6];
    idftp1.ProxySettings.Password:=arraystr[7];    idftp1.ProxySettings.ProxyType:=fpcmHttpProxyWithFtp;
    //idftp1.SendCmd()
    }
  end
  else
    begin
      idftp1.IOHandler:=nil;
    end;
try
  //idftp1.Passive := true;
 idftp1.Connect(true);
except
  showmessage('连接ftp失败');
end; end;程序报错:
EIdSocksAuthMethodError with message 'Invalid socks authentication method'
请问是什么原因连接不上?有没有兄弟有用idftp成功连接代理的例子?