mirror of
https://github.com/JKorf/CryptoExchange.Net.git
synced 2026-08-19 04:13:02 +00:00
proxy authentication added
This commit is contained in:
@@ -13,6 +13,16 @@ namespace CryptoExchange.Net.Objects
|
||||
/// </summary>
|
||||
public int Port { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The login of the proxy
|
||||
/// </summary>
|
||||
public string Login { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The password of the proxy
|
||||
/// </summary>
|
||||
public string Password { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Create new settings for a proxy
|
||||
/// </summary>
|
||||
@@ -26,5 +36,22 @@ namespace CryptoExchange.Net.Objects
|
||||
Host = host;
|
||||
Port = port;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// Create new settings for a proxy
|
||||
/// </summary>
|
||||
/// <param name="host">The proxy hostname/ip</param>
|
||||
/// <param name="port">The proxy port</param>
|
||||
/// <param name="login">The proxy login</param>
|
||||
/// <param name="password">The proxy password</param>
|
||||
public ApiProxy(string host, int port, string login, string password) : this(host, port)
|
||||
{
|
||||
if (string.IsNullOrEmpty(login) || string.IsNullOrEmpty(password))
|
||||
throw new ArgumentException("Proxy login or password not filled");
|
||||
|
||||
Login = login;
|
||||
Password = Password;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user