An NDoc Documented Class Library

ExFTPClient.SocksContext Property

NOTE: This property is now obsolete.

Use ProxySettings


Controls SOCKS integration.

public EnterpriseDT.Util.Socks.SocksContext SocksContext {get; set;}

Implements

IExFileTransferClient.SocksContext

Remarks

SOCKS may be used for FTPing through firewalls. For this to be possible a SOCKS proxy must be available, and a user account must be set up on that proxy. SSLFTPClient supports all the popular versions of SOCKS - 4, 4A, and 5.

The SOCKS features are controlled entirely through the SocksContext property. If it is null (the default) then SOCKS is not used. To use SOCKS, the property must be set to an instance of Socks4Context or Socks5Context. For example, for SOCKS4:

    myFTPClient.SocksContext = new Socks4Context("192.168.0.2", 1080, "marvin23");
and for SOCKS5:
    Socks5Context socks = new Socks5Context("192.168.0.2", 1080);
    socks.AuthMethods.Add(new Socks5NoAuthMethod());
    socks.AuthMethods.Add(new Socks5UserNamePasswordAuthMethod("marvin23", "m31erk"));
    myFTPClient.SocksContext = socks;

See Also

ExFTPClient Class | EnterpriseDT.Net.Ftp Namespace