ProxyConnectParameters¶
Represents parameters used when connecting through a proxy server.
Remarks:
The ProxyConnectParameters struct defines the parameters required when initiating a connection through a proxy server. It includes information about the proxy, target URI, and callbacks for success and error handling. This struct is commonly used during the negotiation steps in the Negotiator class.
Fields:¶
Int32 ProxyConnectParameters.MaxAuthenticationAttempts
¶
- The maximum number of authentication attempts allowed during proxy connection.
Proxy proxy¶
- The proxy server through which the connection is established.
PeekableContentProviderStream stream¶
- The stream used for communication with the proxy server.
Uri uri¶
- The target URI to reach through the proxy server.
CancellationToken token¶
- A cancellation token that allows canceling the proxy connection operation.
Int32 AuthenticationAttempts¶
- The number of authentication attempts made during proxy connection.
Boolean createTunel¶
- Gets or sets a value indicating whether to create a proxy tunnel. A proxy tunnel, also known as a TCP tunnel, is established when communication between the client and the target server needs to be relayed through the proxy without modification. Setting this field to
true
indicates the intention to create a tunnel, allowing the data to pass through the proxy without interpretation or alteration by the proxy. This is typically used for protocols like HTTPS, where end-to-end encryption is desired, and the proxy should act as a pass-through conduit.
LoggingContext context¶
- The logging context for debugging purposes.
Action<ProxyConnectParameters> OnSuccess¶
- A callback to be executed upon successful proxy connection.
Action<ProxyConnectParameters, Exception, Boolean> OnError¶
- A callback to be executed upon encountering an error during proxy connection. The callback includes parameters for the current connection parameters, the encountered exception, and a flag indicating whether the connection should be retried for authentication.