Table of Contents

Class HttpProxyClientOptions

Namespace
VpnHood.Net.Proxies.HttpProxyClients
Assembly
VpnHood.Net.Proxies.dll

Provides the settings of an HttpProxyClient.

public class HttpProxyClientOptions
Inheritance
HttpProxyClientOptions
Inherited Members

Properties

AllowInvalidCertificates

Gets a value indicating whether a proxy certificate that fails validation is accepted. The default is false.

public bool AllowInvalidCertificates { get; init; }

Property Value

bool

Remarks

Accepting such a certificate lets anyone between the client and the proxy read and change the traffic.

ExtraHeaders

Gets headers sent with each CONNECT request after the client's own, or null for none.

public IReadOnlyDictionary<string, string>? ExtraHeaders { get; init; }

Property Value

IReadOnlyDictionary<string, string>

Remarks

Names and values are sent as given, so they must not contain line breaks.

Password

Gets the password sent with Username. null is sent as an empty password.

public string? Password { get; init; }

Property Value

string

ProxyEndPoint

Gets the address and port of the HTTP or HTTPS proxy.

public required IPEndPoint ProxyEndPoint { get; init; }

Property Value

IPEndPoint

ProxyHost

Gets the proxy's host name, which the TLS handshake uses as the server name when UseTls is true, or null to use the IP address of ProxyEndPoint.

public string? ProxyHost { get; init; }

Property Value

string

UseTls

Gets a value indicating whether the connection to the proxy itself runs over TLS, as an HTTPS proxy expects. The default is false.

public bool UseTls { get; init; }

Property Value

bool

Remarks

The system chooses the TLS version, and the certificate's revocation is not checked. Read and write the tunnel through GetStream(TcpClient): the connection's own stream bypasses TLS.

Username

Gets the user name for Basic authentication, sent in a Proxy-Authorization header, or null to send no credentials.

public string? Username { get; init; }

Property Value

string