ComponentPro UltimateFtp

      Proxy servers

      Language Filter: AllSend comments on this topic to ComponentPro

      The Ultimate FTP component fully supports many proxy servers (often referred to as "proxies"). If you need to connect to your FTP server through a proxy, simply create a new instance of the FtpProxy class, set the appropriate properties of the FtpProxy object, and assign it to the Proxy property of the Ftp class, and the necessary proxy communication will take place.

      Ultimate FTP component supports the following Proxy servers:

      SOCKS4 SOCKS4 proxy.
      SOCKS4A SOCKS4A proxy (capable of resolving domain names).
      SOCKS5 SOCKS5 proxy.
      HTTP CONNECT HTTP proxy using CONNECT method.
      Site Connection through FTP proxy using SITE command.
      User Connection through FTP proxy using a single USER/PASS command.
      Open Connection through FTP proxy using OPEN command.
      DoubleLogin Connection through FTP proxy using two separate USER/PASS commands (one USER command for logging in the proxy and the second USER command for logging in the FTP server).

      The following steps will help you to connect to an SFTP server through a proxy server

      using ComponentPro.Net;
      // Create a new Ftp instance.
      Ftp client = new Ftp();
      client.Proxy = new FtpProxy();
      client.Proxy.Server = "myproxyhost";
      client.Proxy.Port = 2121; // replace 2121 with your port number.
      client.Proxy.ProxyType = FtpProxyType.User;
      client.Proxy.UserName = "proxyusername";
      client.Proxy.Password = "proxypassword";
      // Connect to the FTP server.
      // Authenticate.
      client.Authenticate("username", "password");
      // Do something here. You can browse directories, list files, upload, download,... 
      // ...
      client.DownloadFile("/my remote file.dat", "my local file");
      // Disconnect.