Socks |
public class Socks4Client : SocksClient
The Socks4Client type exposes the following members.
| Name | Description | |
|---|---|---|
| Socks4Client(String, Int32) | Initializes a new instance of the Socks4Client class. | |
| Socks4Client(String, Int32, NetworkCredential) | Initializes a new instance of the Socks4Client class. |
| Name | Description | |
|---|---|---|
| IsSocks4a | Get or set whether this Socks4Client is a Socks4a client. | |
| LocalEndPoint |
Get or set the local IP end point to use when connecting to a remote host.
(Inherited from ProxyClient) | |
| ProxyCredentials |
Gets the proxy credentials.
(Inherited from ProxyClient) | |
| ProxyHost |
Get the proxy host.
(Inherited from ProxyClient) | |
| ProxyPort |
Get the proxy port.
(Inherited from ProxyClient) | |
| SocksVersion |
Get the SOCKS protocol version.
(Inherited from SocksClient) |
| Name | Description | |
|---|---|---|
| Connect(String, Int32, CancellationToken) |
Connect to the target host.
(Overrides ProxyClientConnect(String, Int32, CancellationToken)) | |
| Connect(String, Int32, Int32, CancellationToken) |
Connect to the target host.
(Inherited from ProxyClient) | |
| ConnectAsync(String, Int32, CancellationToken) |
Asynchronously connect to the target host.
(Overrides ProxyClientConnectAsync(String, Int32, CancellationToken)) | |
| ConnectAsync(String, Int32, Int32, CancellationToken) |
Asynchronously connect to the target host.
(Inherited from ProxyClient) | |
| Equals | (Inherited from Object) | |
| Finalize | (Inherited from Object) | |
| GetHashCode | (Inherited from Object) | |
| GetType | (Inherited from Object) | |
| MemberwiseClone | (Inherited from Object) | |
| ToString | (Inherited from Object) |
public static void SendMessageViaProxy (MimeMessage message) { using (var client = new SmtpClient ()) { client.ProxyClient = new Socks5Proxy ("socks5.proxy.com", 1080, new NetworkCredentials ("proxyUserName", "proxyPassword")); client.Connect ("smtp.gmail.com", 465, SecureSocketOptions.SslOnConnect); client.Authenticate ("username", "password"); client.Send (message); client.Disconnect (true); } }