Connect to ftp server using FtpProxy and Ftps protocol

0 votes
asked Mar 23, 2015 by ganeshspy (900 points)

How?,Connect to ftp server through Ftps protocol using FtpProxy.

Applies to: Rebex FTP/SSL

1 Answer

0 votes
answered Mar 23, 2015 by Tomas Knopp (58,880 points)

Please try the code below (choose the FtpProxyType based on your proxy type):

// create FTP client instance
var ftp = new Rebex.Net.Ftp();

// use FTP OPEN proxy or choose the proxy type that you need
ftp.Proxy.ProxyType = FtpProxyType.FtpOpen;
ftp.Proxy.Host = proxyHost;
ftp.Proxy.Port = proxyPort;
ftp.Proxy.UserName = proxyUserName;
ftp.Proxy.Password = proxyPassword;

// connect to the server
ftp.Connect(hostname, SslMode.Implicit); // use SslMode.Implicit or SslMode.Explicit based on your FTP server
ftp.Login(username, password);

// etc.

ftp.Disconnect();

Basically we support these Ftp proxy types:

More information including code snippets for all supported proxy server types can be found at http://www.rebex.net/ftp-ssl.net/features/proxy.aspx

...