NET SFTP Library
Proxy Property
Example 






KellermanSoftware.NetSFtpLibrary Namespace > SFTP 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 Property Proxy As ProxyInfo
'Usage
 
Dim instance As SFTP
Dim value As ProxyInfo
 
instance.Proxy = value
 
value = instance.Proxy
public ProxyInfo Proxy {get; set;}
public read-write property Proxy: ProxyInfo; 
public function get,set Proxy : ProxyInfo
public: __property ProxyInfo* get_Proxy();
public: __property void set_Proxy( 
   ProxyInfo* value
);
public:
property ProxyInfo^ Proxy {
   ProxyInfo^ get();
   void set (    ProxyInfo^ value);
}
Example
SFTP sftp = new SFTP(); //Trial Mode            
//SFTP sftp = new SFTP("place user name here", "place license key here");
 
// Set the name of the SSH server( its URL )
sftp.HostAddress = "some.sftp.server.com"; // replace with your SFTP server
sftp.UserName  = "anonymous"; // replace With your user name
sftp.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;
sftp.Proxy = proxy;
sftp.Connect();
Dim sftp As SFTP = New SFTP() 'Trial Mode
'Dim sftp As SFTP = New SFTP("place user name here", "place license key here");
 
' set the name of the SSH server( its URL )
sftp.HostAddress = "some.sftp.server.com" ' replace with your SFTP server
sftp.UserName  = "anonymous" ' replace with your user name
sftp.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
sftp.Proxy = proxy
sftp.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

SFTP Class
SFTP Members