Class Proxy
Describes proxy settings to be used with a driver instance.
public class Proxy
- Inheritance
-
Proxy
- Inherited Members
Constructors
Proxy()
Initializes a new instance of the Proxy class.
public Proxy()
Proxy(Dictionary<string, object>)
Initializes a new instance of the Proxy class with the given proxy settings.
public Proxy(Dictionary<string, object> settings)
Parameters
settings
Dictionary<string, object>A dictionary of settings to use with the proxy.
Exceptions
- ArgumentNullException
If
settings
is null.- ArgumentException
If The "noProxy" value is a list with a null element.
Properties
BypassProxyAddresses
Gets the list of address for which to bypass the proxy as an array.
[JsonPropertyName("noProxy")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public ReadOnlyCollection<string>? BypassProxyAddresses { get; }
Property Value
FtpProxy
Gets or sets the value of the proxy for the FTP protocol.
[JsonPropertyName("ftpProxy")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? FtpProxy { get; set; }
Property Value
HttpProxy
Gets or sets the value of the proxy for the HTTP protocol.
[JsonPropertyName("httpProxy")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? HttpProxy { get; set; }
Property Value
IsAutoDetect
Gets or sets a value indicating whether the proxy uses automatic detection.
[JsonIgnore]
public bool IsAutoDetect { get; set; }
Property Value
Kind
Gets or sets the type of proxy.
[JsonIgnore]
public ProxyKind Kind { get; set; }
Property Value
ProxyAutoConfigUrl
Gets or sets the URL used for proxy automatic configuration.
[JsonPropertyName("proxyAutoconfigUrl")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? ProxyAutoConfigUrl { get; set; }
Property Value
SerializableProxyKind
Gets the type of proxy as a string for JSON serialization.
[JsonPropertyName("proxyType")]
public string SerializableProxyKind { get; }
Property Value
SocksPassword
Gets or sets the value of password for the SOCKS proxy.
[JsonPropertyName("socksPassword")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? SocksPassword { get; set; }
Property Value
SocksProxy
Gets or sets the value of the proxy for the SOCKS protocol.
[JsonPropertyName("socksProxy")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? SocksProxy { get; set; }
Property Value
SocksUserName
Gets or sets the value of username for the SOCKS proxy.
[JsonPropertyName("socksUsername")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? SocksUserName { get; set; }
Property Value
SocksVersion
Gets or sets the value of the protocol version for the SOCKS proxy. Value can be null if not set.
[JsonPropertyName("socksVersion")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public int? SocksVersion { get; set; }
Property Value
- int?
SslProxy
Gets or sets the value of the proxy for the SSL protocol.
[JsonPropertyName("sslProxy")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? SslProxy { get; set; }
Property Value
Methods
AddBypassAddress(string)
Adds a single address to the list of addresses against which the proxy will not be used.
public void AddBypassAddress(string address)
Parameters
address
stringThe address to add.
AddBypassAddresses(IEnumerable<string>)
Adds addresses to the list of addresses against which the proxy will not be used.
public void AddBypassAddresses(IEnumerable<string> addressesToAdd)
Parameters
addressesToAdd
IEnumerable<string>An IEnumerable<T> object of arguments to add.
AddBypassAddresses(params string[])
Adds addresses to the list of addresses against which the proxy will not be used.
public void AddBypassAddresses(params string[] addressesToAdd)
Parameters
addressesToAdd
string[]An array of addresses to add.