Class ProxyEndPoint
- Namespace
- VpnHood.Core.Proxies.Management.Abstractions
- Assembly
- VpnHood.Core.Proxies.Management.Abstractions.dll
Represents a proxy server: its protocol, address, credentials and whether it is used.
public class ProxyEndPoint
- Inheritance
-
ProxyEndPoint
- Inherited Members
Properties
Host
Gets the proxy's host name or IP address.
public required string Host { get; init; }
Property Value
Id
Gets the endpoint's ID: the hex MD5 hash of its protocol's name, host and port, as in
Socks5://host:1080. The host is hashed as written, so a change of its case gives another ID.
public string Id { get; }
Property Value
IsEnabled
Gets or sets a value indicating whether the endpoint is used. The default is true.
public bool IsEnabled { get; set; }
Property Value
Password
Gets or sets the password, or null.
public string? Password { get; set; }
Property Value
Port
Gets the proxy's port.
public required int Port { get; init; }
Property Value
Protocol
Gets the proxy's protocol.
public required ProxyProtocol Protocol { get; init; }
Property Value
Url
Gets the endpoint's URL, credentials included, as socks5://user:password@host:1080/?enabled=1. The
query is there only for an enabled endpoint.
public Uri Url { get; }
Property Value
Username
Gets or sets the user name, or null.
public string? Username { get; set; }
Property Value
Methods
BuildUrlWithoutPassword()
Builds the endpoint's URL with its scheme, host and port alone.
public Uri BuildUrlWithoutPassword()
Returns
- Uri
The URL, without credentials or query.