请问,TIdFTP中怎样设置代理服务器和代理端口?
  with IdFTP1 do try
    User := UserIDEdit.Text;
    Password := PasswordEdit.Text;
    Host := FtpServerEdit.Text;
    //我要用代理服务器怎么办?
    Connect;

解决方案 »

  1.   

    在TIdFtp的SockInfo属性中设置(我也是刚刚查过帮助)
    with IdFtp1.SockInfo do
    begin
      Authentication :=saNoAuthentication;
      Host :='';{代理服务器地址}
      Port :='';{代理服务器FTP端口}
      version :='';{Sock代理连接的版本,可选svSocks4 - SOCKS version 4.0
    svSocks4A - SOCKS version 4.0A
    svSocks5 - SOCKS version 5.0}
      {**如果Authentication设为saUsernamePassword则需要再另外加入
      UserID :='';代理服务器的用户
      Password :='';代理服务器的验证密码
    **}
    end;