NET FTP Library
Proxy Property
Example 






KellermanSoftware.NetFtpLibrary Namespace > FTP Class : Proxy Property
Hold Information about the FTP Proxy Server. Socks 5 is normally used for proxy servers with port 1080. The older Socks 4 is supported, this also normally operates on port 1080.
Syntax
'Declaration
 
Public Overridable Property Proxy As ProxyInfo
'Usage
 
Dim instance As FTP
Dim value As ProxyInfo
 
instance.Proxy = value
 
value = instance.Proxy
public virtual ProxyInfo Proxy {get; set;}
public read-write property Proxy: ProxyInfo; virtual; 
public function get,set Proxy : ProxyInfo
public: __property virtual ProxyInfo* get_Proxy();
public: __property virtual void set_Proxy( 
   ProxyInfo* value
);
public:
virtual property ProxyInfo^ Proxy {
   ProxyInfo^ get();
   void set (    ProxyInfo^ value);
}
Example
FTP ftp = New FTP(); //Trial Mode            
//FTP ftp = New FTP("place user name here", "place license key here");
 
// Set the name of the FTP server( its URL )
ftp.HostAddress = "ftp.fsz.bme.hu"; // a hungarian university. change this to your ftp server
ftp.UserName = "anonymous"; // replace With your user name
ftp.Password = "user@mail.com"; // replace With your password
 
ProxyInfo proxy = New ProxyInfo();
proxy.Type = ProxyType.Socks5;
proxy.Host = "localhost";
proxy.UserName = "admin";
proxy.Password = "secret";
proxy.Port = 1080;
ftp.Proxy = proxy;
ftp.Connect();
Dim ftp As FTP = New FTP() 'Trial Mode
'FTP ftp = new FTP("place user name here", "place license key here");
 
' set the name of the FTP server( its URL )
ftp.HostAddress = "ftp.fsz.bme.hu" ' a hungarian university. change this to your ftp server
ftp.UserName = "anonymous" ' replace with your user name
ftp.Password = "user@mail.com" ' replace with your password
 
Dim proxy As ProxyInfo = New ProxyInfo()
proxy.Type = ProxyType.Socks5
proxy.Host = "localhost"
proxy.UserName = "admin"
proxy.Password = "secret"
proxy.Port = 1080
ftp.Proxy = proxy
ftp.Connect()
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

FTP Class
FTP Members