namespace FluentFTP.Proxy { /// A FTP client with a user@host proxy identification. public class FtpClientUserAtHostProxy : FtpClientProxy { /// A FTP client with a user@host proxy identification. /// Proxy information public FtpClientUserAtHostProxy(ProxyInfo proxy) : base(proxy) { ConnectionType = "User@Host"; } /// FTP Create. protected override FtpClient Create() { return new FtpClientUserAtHostProxy(Proxy); } /// Redefine the first dialog: auth with proxy information protected override void Handshake() { // Proxy authentication eventually needed. if (Proxy.Credentials != null) Authenticate(Proxy.Credentials.UserName, Proxy.Credentials.Password); // Connection USER@Host meens to change user name to add host. Credentials.UserName = Credentials.UserName + "@" + Host; } } }