namespace FluentFTP.Proxy {
///
/// Abstraction of an FtpClient with a proxy
///
public abstract class FtpClientProxy : FtpClient {
private ProxyInfo _proxy;
/// The proxy connection info.
protected ProxyInfo Proxy { get { return _proxy; } }
/// A FTP client with a HTTP 1.1 proxy implementation
/// Proxy information
protected FtpClientProxy(ProxyInfo proxy) {
_proxy = proxy;
}
/// Redefine connect for FtpClient : authentication on the Proxy
/// The socket stream.
protected override void Connect(FtpSocketStream stream) {
stream.Connect(Proxy.Host, Proxy.Port, InternetProtocolVersions);
}
}
}