### Start Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.ProxyServer.html Starts the proxy server instance. Optionally clears system proxy settings to prevent cycles. ```APIDOC ## Start(Boolean) ### Description Starts this proxy server instance. ### Method public void Start(bool changeSystemProxySettings = true) ### Parameters #### Path Parameters - **changeSystemProxySettings** (Boolean) - Optional - Whether or not to clear any system proxy settings which is pointing to our own endpoint (causing a cycle). E.g. due to ungraceful proxy shutdown before. ``` -------------------------------- ### Setup HTTP Proxy Server Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/README.md Example of setting up an HTTP proxy server using the Titanium Web Proxy library. This snippet demonstrates basic proxy server configuration. ```csharp var proxy = new ProxyServer(); proxy.OnRequest += (req, cert, response, id) => { // Handle request }; proxy.OnResponse += (resp, id) => { // Handle response }; proxy.Start(); ``` -------------------------------- ### Install Titanium Web Proxy (Stable) Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/README.md Install the stable version of the Titanium Web Proxy package using the NuGet Package Manager Console. ```powershell Install-Package Titanium.Web.Proxy ``` -------------------------------- ### Install Titanium Web Proxy (Pre-release) Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/README.md Install the pre-release version of the Titanium Web Proxy package using the NuGet Package Manager Console. ```powershell Install-Package Titanium.Web.Proxy -Pre ``` -------------------------------- ### Configure and Start Titanium Web Proxy Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/README.md Demonstrates how to initialize a proxy server, configure explicit and transparent endpoints, handle requests and responses, and set the proxy as a system proxy. Ensure necessary event handlers are defined elsewhere. ```csharp var proxyServer = new ProxyServer(); // locally trust root certificate used by this proxy proxyServer.CertificateManager.TrustRootCertificate(true); // optionally set the Certificate Engine // Under Mono only BouncyCastle will be supported //proxyServer.CertificateManager.CertificateEngine = Network.CertificateEngine.BouncyCastle; proxyServer.BeforeRequest += OnRequest; proxyServer.BeforeResponse += OnResponse; proxyServer.ServerCertificateValidationCallback += OnCertificateValidation; proxyServer.ClientCertificateSelectionCallback += OnCertificateSelection; var explicitEndPoint = new ExplicitProxyEndPoint(IPAddress.Any, 8000, true) { // Use self-issued generic certificate on all https requests // Optimizes performance by not creating a certificate for each https-enabled domain // Useful when certificate trust is not required by proxy clients //GenericCertificate = new X509Certificate2(Path.Combine(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), "genericcert.pfx"), "password") }; // Fired when a CONNECT request is received explicitEndPoint.BeforeTunnelConnectRequest += OnBeforeTunnelConnectRequest; // An explicit endpoint is where the client knows about the existence of a proxy // So client sends request in a proxy friendly manner proxyServer.AddEndPoint(explicitEndPoint); proxyServer.Start(); // Transparent endpoint is useful for reverse proxy (client is not aware of the existence of proxy) // A transparent endpoint usually requires a network router port forwarding HTTP(S) packets or DNS // to send data to this endPoint var transparentEndPoint = new TransparentProxyEndPoint(IPAddress.Any, 8001, true) { // Generic Certificate hostname to use // when SNI is disabled by client GenericCertificateName = "google.com" }; proxyServer.AddEndPoint(transparentEndPoint); //proxyServer.UpStreamHttpProxy = new ExternalProxy() { HostName = "localhost", Port = 8888 }; //proxyServer.UpStreamHttpsProxy = new ExternalProxy() { HostName = "localhost", Port = 8888 }; foreach (var endPoint in proxyServer.ProxyEndPoints) Console.WriteLine("Listening on '{0}' endpoint at Ip {1} and port: {2} ", endPoint.GetType().Name, endPoint.IpAddress, endPoint.Port); // Only explicit proxies can be set as system proxy! proxyServer.SetAsSystemHttpProxy(explicitEndPoint); proxyServer.SetAsSystemHttpsProxy(explicitEndPoint); // wait here (You can use something else as a wait function, I am using this as a demo) Console.Read(); // Unsubscribe & Quit explicitEndPoint.BeforeTunnelConnectRequest -= OnBeforeTunnelConnectRequest; proxyServer.BeforeRequest -= OnRequest; proxyServer.BeforeResponse -= OnResponse; proxyServer.ServerCertificateValidationCallback -= OnCertificateValidation; proxyServer.ClientCertificateSelectionCallback -= OnCertificateSelection; proxyServer.Stop(); ``` -------------------------------- ### Extensions Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.StreamExtended.ServerHelloInfo.html Gets or sets the SSL extensions included in the Server Hello message. ```APIDOC ## Extensions ### Description Gets or sets the SSL extensions included in the Server Hello message. ### Property Value - **Type**: Dictionary - **Description**: A dictionary containing SSL extensions, where keys are extension names and values are SslExtension objects. ``` -------------------------------- ### CipherSuite Property Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.StreamExtended.ServerHelloInfo.html Gets the cipher suite used in the server hello. ```APIDOC ## CipherSuite Property ### Description Gets the cipher suite used in the server hello. ### Property Value - **CipherSuite** (Int32) - The cipher suite. ``` -------------------------------- ### Method Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Http.Request.html Gets or sets the HTTP method of the request (e.g., GET, POST). ```APIDOC ## Method ### Description Represents the HTTP method used for the request. ### Property Value Type: [String](https://learn.microsoft.com/dotnet/api/system.string) Description: The HTTP method of the request. ``` -------------------------------- ### CompressionMethod Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.StreamExtended.ServerHelloInfo.html Gets or sets the compression method used in the Server Hello message. ```APIDOC ## CompressionMethod ### Description Gets or sets the compression method used in the Server Hello message. ### Property Value - **Type**: Byte - **Description**: Represents the compression method. ``` -------------------------------- ### EnsureRootCertificate() Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Network.CertificateManager.html Ensures that the necessary root certificates are set up. This method creates the root certificate if it doesn't exist and trusts it based on the initial setup from the proxy constructor. ```APIDOC ## EnsureRootCertificate() ### Description Ensures certificates are setup (creates root if required). Also makes root certificate trusted based on initial setup from proxy constructor for user/machine trust. ### Method public void EnsureRootCertificate() ### Parameters None ``` -------------------------------- ### HttpClient Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.html Gets the HttpWebClient instance used for communication with the server in this session. ```APIDOC ## Property: HttpClient ### Description Returns the `HttpWebClient` instance responsible for handling HTTP communications with the target server for this specific session. ### Declaration ```csharp public HttpWebClient HttpClient { get; } ``` ### Property Value - **Type**: [HttpWebClient](Titanium.Web.Proxy.Http.HttpWebClient.html) - **Description**: The HTTP client object used for server interactions. ``` -------------------------------- ### Get(Int32) Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Http2.Hpack.StaticTable.html Retrieves an HttpHeader object from the static table using its index. ```APIDOC ## Get(Int32) ### Description Return the http header field at the given index value. ### Method `public static HttpHeader Get(int index)` ### Parameters #### Path Parameters - **index** (Int32) - Required - The index of the header field to retrieve. ### Returns #### Success Response - **HttpHeader** - The header field corresponding to the provided index. ``` -------------------------------- ### RootCertificate Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Network.CertificateManager.html Gets or sets the X509Certificate2 object representing the root certificate. If not set, a default certificate will be generated. ```APIDOC ## RootCertificate ### Description The root certificate object. If this property is not set, a default root certificate will be generated and used. ### Property Value * **Type**: X509Certificate2 * **Description**: The root certificate used by the proxy. ``` -------------------------------- ### ServerHelloInfo Constructor Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.StreamExtended.ServerHelloInfo.html Initializes a new instance of the ServerHelloInfo class with handshake details. ```APIDOC ## ServerHelloInfo Constructor ### Description Initializes a new instance of the ServerHelloInfo class. ### Parameters #### Parameters - **handshakeVersion** (Int32) - The handshake version. - **majorVersion** (Int32) - The major version. - **minorVersion** (Int32) - The minor version. - **random** (Byte[]) - The random bytes. - **sessionId** (Byte[]) - The session ID. - **cipherSuite** (Int32) - The cipher suite. - **serverHelloLength** (Int32) - The length of the server hello. ``` -------------------------------- ### Encoding Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Http.RequestResponseBase.html Gets the encoding for this request or response. ```APIDOC ## Encoding ### Description Gets the encoding for this request or response. ### Declaration ```csharp public Encoding Encoding { get; } ``` ### Property Value Type: [Encoding](https://learn.microsoft.com/dotnet/api/system.text.encoding) Description: The encoding for the request/response. ``` -------------------------------- ### SupportedServerSslProtocols Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.ProxyServer.html List of supported Server Ssl versions. Using SslProtocol.None means to require the same SSL protocol as the proxy client. ```APIDOC ## SupportedServerSslProtocols ### Description List of supported Server Ssl versions. Using SslProtocol.None means to require the same SSL protocol as the proxy client. ### Declaration ```csharp public SslProtocols SupportedServerSslProtocols { get; set; } ``` ### Property Value Type Description [SslProtocols](https://learn.microsoft.com/dotnet/api/system.security.authentication.sslprotocols) ``` -------------------------------- ### ClientRemoteEndPoint Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.html Gets the remote endpoint of the client connection. ```APIDOC ## ClientRemoteEndPoint ### Description Gets the remote endpoint of the client connection. ### Property Value Type: [IPEndPoint](https://learn.microsoft.com/dotnet/api/system.net.ipendpoint) ### Declaration ```csharp public IPEndPoint ClientRemoteEndPoint { get; } ``` ``` -------------------------------- ### ClientLocalEndPoint Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.html Gets the local endpoint of the client connection. ```APIDOC ## ClientLocalEndPoint ### Description Gets the local endpoint of the client connection. ### Property Value Type: [IPEndPoint](https://learn.microsoft.com/dotnet/api/system.net.ipendpoint) ### Declaration ```csharp public IPEndPoint ClientLocalEndPoint { get; } ``` ``` -------------------------------- ### TransparentBaseProxyEndPoint Constructor Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Models.TransparentBaseProxyEndPoint.html Initializes a new instance of the TransparentBaseProxyEndPoint class. ```APIDOC ## TransparentBaseProxyEndPoint(IPAddress, Int32, Boolean) ### Description Initializes a new instance of the TransparentBaseProxyEndPoint class. ### Method Protected constructor ### Parameters #### Path Parameters - **ipAddress** (IPAddress) - Description of the IP address. - **port** (Int32) - Description of the port number. - **decryptSsl** (Boolean) - Description of whether SSL decryption is enabled. ``` -------------------------------- ### ClientConnectionId Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.html Gets the unique identifier for the client connection. ```APIDOC ## ClientConnectionId ### Description Gets the unique identifier for the client connection. ### Property Value Type: [Guid](https://learn.microsoft.com/dotnet/api/system.guid) ### Declaration ```csharp public Guid ClientConnectionId { get; } ``` ``` -------------------------------- ### SslExtension Constructor Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.StreamExtended.Models.SslExtension.html Initializes a new instance of the SslExtension class with the specified value, data, and position. ```APIDOC ## SslExtension(Int32, ReadOnlyMemory, Int32) ### Description Initializes a new instance of the [SslExtension](Titanium.Web.Proxy.StreamExtended.Models.SslExtension.html) class. ### Parameters - **value** (Int32) - The value. - **data** (ReadOnlyMemory) - The data. - **position** (Int32) - The position. ``` -------------------------------- ### Headers Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Http.RequestResponseBase.html Gets the collection of all headers for the request or response. ```APIDOC ## Headers ### Description Gets the collection of all headers for the request or response. ### Declaration ```csharp public HeaderCollection Headers { get; } ``` ### Property Value Type: [HeaderCollection](Titanium.Web.Proxy.Http.HeaderCollection.html) Description: The collection of all headers. ``` -------------------------------- ### Response() Constructor Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Http.Response.html Initializes a new instance of the Response class with no body. ```APIDOC ## Response() ### Description Constructor for the Response class. ### Syntax ```csharp public Response() ``` ``` -------------------------------- ### ContentEncoding Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Http.RequestResponseBase.html Gets the content encoding for this request or response. ```APIDOC ## ContentEncoding ### Description Gets the content encoding for this request or response. ### Declaration ```csharp public string ContentEncoding { get; } ``` ### Property Value Type: [String](https://learn.microsoft.com/dotnet/api/system.string) Description: The content encoding of the request/response. ``` -------------------------------- ### TransparentProxyEndPoint Constructor Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Models.TransparentProxyEndPoint.html Initializes a new instance of the TransparentProxyEndPoint class. ```APIDOC ## TransparentProxyEndPoint(IPAddress, Int32, Boolean) ### Description Initializes a new instance of the TransparentProxyEndPoint class. ### Method TransparentProxyEndPoint ### Parameters #### Parameters - **ipAddress** (IPAddress) - Required - Listening Ip address. - **port** (Int32) - Required - Listening port. - **decryptSsl** (Boolean) - Optional - Should we decrypt ssl? (defaults to true) ``` -------------------------------- ### ProxyServer Constructors Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.ProxyServer.html Initializes a new instance of the ProxyServer class. You can configure trust settings for HTTPS certificates. ```APIDOC ## ProxyServer(Boolean, Boolean, Boolean) ### Description Initializes a new instance of ProxyServer class with provided parameters. ### Parameters - **userTrustRootCertificate** (Boolean) - Required/Optional - Should fake HTTPS certificate be trusted by this machine's user certificate store? - **machineTrustRootCertificate** (Boolean) - Required/Optional - Should fake HTTPS certificate be trusted by this machine's certificate store? - **trustRootCertificateAsAdmin** (Boolean) - Required/Optional - Should we attempt to trust certificates with elevated permissions by prompting for UAC if required? ## ProxyServer(String, String, Boolean, Boolean, Boolean) ### Description Initializes a new instance of ProxyServer class with provided parameters. ### Parameters - **rootCertificateName** (String) - Required/Optional - Name of the root certificate. - **rootCertificateIssuerName** (String) - Required/Optional - Name of the root certificate issuer. - **userTrustRootCertificate** (Boolean) - Required/Optional - Should fake HTTPS certificate be trusted by this machine's user certificate store? - **machineTrustRootCertificate** (Boolean) - Required/Optional - Should fake HTTPS certificate be trusted by this machine's certificate store? - **trustRootCertificateAsAdmin** (Boolean) - Required/Optional - Should we attempt to trust certificates with elevated permissions by prompting for UAC if required? ``` -------------------------------- ### MinorVersion Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.StreamExtended.ServerHelloInfo.html Gets the minor version number of the SSL/TLS protocol. ```APIDOC ## MinorVersion ### Description Gets the minor version number of the SSL/TLS protocol. ### Property Value - **Type**: Int32 - **Description**: The minor version number (e.g., 3 for TLS 1.3). ``` -------------------------------- ### SupportedSslProtocols Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.ProxyServer.html List of supported Ssl versions. ```APIDOC ## SupportedSslProtocols ### Description List of supported Ssl versions. ### Declaration ```csharp public SslProtocols SupportedSslProtocols { get; set; } ``` ### Property Value Type Description [SslProtocols](https://learn.microsoft.com/dotnet/api/system.security.authentication.sslprotocols) ``` -------------------------------- ### MajorVersion Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.StreamExtended.ServerHelloInfo.html Gets the major version number of the SSL/TLS protocol. ```APIDOC ## MajorVersion ### Description Gets the major version number of the SSL/TLS protocol. ### Property Value - **Type**: Int32 - **Description**: The major version number (e.g., 3 for TLS 1.x). ``` -------------------------------- ### CreateRootCertificate Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Network.CertificateManager.html Attempts to create a root certificate, with an option to persist it to a file. ```APIDOC ## CreateRootCertificate(Boolean) ### Description Attempts to create a RootCertificate. If `persistToFile` is true, it tries to load/save the certificate from/to rootCert.pfx. ### Method public bool CreateRootCertificate(bool persistToFile = true) ### Endpoint N/A (Method Call) ### Parameters #### Query Parameters - **persistToFile** (Boolean) - Optional - If set to `true` try to load/save the certificate from rootCert.pfx. ### Returns - **Boolean** - true if succeeded, else false. ``` -------------------------------- ### HandshakeVersion Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.StreamExtended.ServerHelloInfo.html Gets the handshake version used in the SSL/TLS connection. ```APIDOC ## HandshakeVersion ### Description Gets the handshake version used in the SSL/TLS connection. ### Property Value - **Type**: Int32 - **Description**: The handshake version of the SSL/TLS protocol. ``` -------------------------------- ### ProxyServer Class Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.ProxyServer.html The ProxyServer class serves as the foundation for the proxy functionality. Users can instantiate this class to create proxy servers. It implements the IDisposable interface, indicating that it should be disposed of when no longer needed to release resources. ```APIDOC ## Class ProxyServer ### Description This class is the backbone of the proxy functionality. It allows users to create and manage proxy server instances. Care must be taken to avoid using the same listening ports across multiple instances. ### Inheritance - Object ### Implements - IDisposable ### Namespace Titanium.Web.Proxy ### Assembly Titanium.Web.Proxy.dll ### Syntax ```csharp public class ProxyServer : IDisposable ``` ``` -------------------------------- ### CustomUpStreamProxy Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.html Gets or sets the custom upstream proxy for the session. ```APIDOC ## CustomUpStreamProxy ### Description Gets or sets the custom upstream proxy for the session. ### Property Value Type: [IExternalProxy](Titanium.Web.Proxy.Models.IExternalProxy.html) ### Declaration ```csharp public IExternalProxy CustomUpStreamProxy { get; set; } ``` ``` -------------------------------- ### ContentType Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Http.RequestResponseBase.html Gets or sets the content type of the request or response. ```APIDOC ## ContentType ### Description Gets or sets the content type of the request or response. ### Declaration ```csharp public string ContentType { get; set; } ``` ### Property Value Type: [String](https://learn.microsoft.com/dotnet/api/system.string) Description: The content-type of the request/response. ``` -------------------------------- ### ProxyEventArgsBase Class Documentation Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.EventArguments.ProxyEventArgsBase.html Documentation for the abstract base class ProxyEventArgsBase, detailing its inheritance and properties. ```APIDOC ## Class ProxyEventArgsBase The base event arguments. ### Inheritance - Object - EventArgs - ProxyEventArgsBase ### Namespace Titanium.Web.Proxy.EventArguments ### Assembly Titanium.Web.Proxy.dll ### Syntax ```csharp public abstract class ProxyEventArgsBase : EventArgs ``` ### Properties #### ClientUserData ##### Declaration ```csharp public object ClientUserData { get; set; } ``` ##### Property Value - **Type**: Object - **Description**: Allows storing custom user data associated with the event. ``` -------------------------------- ### ContentLength Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Http.RequestResponseBase.html Gets or sets the length of the request or response body. ```APIDOC ## ContentLength ### Description Gets or sets the length of the request or response body. ### Declaration ```csharp public long ContentLength { get; set; } ``` ### Property Value Type: [Int64](https://learn.microsoft.com/dotnet/api/system.int64) Description: The length of the body. ``` -------------------------------- ### LoadRootCertificate() Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Network.CertificateManager.html Loads the root certificate from the executing assembly's location. It expects a file named 'rootCert.pfx'. ```APIDOC ## LoadRootCertificate() ### Description Loads the root certificate from the current executing assembly location with the expected name rootCert.pfx. ### Declaration ```csharp public X509Certificate2 LoadRootCertificate() ``` ### Returns - **X509Certificate2**: The loaded root certificate. ``` -------------------------------- ### Response(Byte[]) Constructor Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Http.Response.html Initializes a new instance of the Response class with a specified byte array as the response body. ```APIDOC ## Response(Byte[]) ### Description Constructor for the Response class that accepts a byte array for the response body. ### Syntax ```csharp public Response(byte[] body) ``` ### Parameters * **body** (byte[]) - The byte array representing the response body. ``` -------------------------------- ### ProxyEndPoint Property Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.html Gets the local endpoint via which the request was made. ```APIDOC ## ProxyEndPoint Property ### Description Local endpoint via which we make the request. ### Property Value Type: [ProxyEndPoint](Titanium.Web.Proxy.Models.ProxyEndPoint.html) Description: The local endpoint configuration. ``` -------------------------------- ### Ok(Byte[], IEnumerable, Boolean) Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.EventArguments.SessionEventArgs.html Responds to the client with the specified byte array and headers, ignoring the original request. Optionally closes the server connection. ```APIDOC ## Ok(Byte[], IEnumerable, Boolean) ### Description Before the request is made to the server, respond with the specified byte array to the client and ignore the request. This method allows for early termination of a request with a custom response. ### Method `Ok` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **result** (byte[]) - Required - The HTML content bytes. - **headers** (IEnumerable) - Optional - The HTTP headers. - **closeServerConnection** (Boolean) - Optional - Close the server connection used by request if any? ``` -------------------------------- ### Ok(String, IEnumerable, Boolean) Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.EventArguments.SessionEventArgs.html Responds to the client with the specified HTML string and headers, ignoring the original request. Optionally closes the server connection. ```APIDOC ## Ok(String, IEnumerable, Boolean) ### Description Before the request is made to the server, respond with the specified HTML string to the client and ignore the request. This method provides flexibility in specifying headers for the response. ### Method `Ok` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **html** (String) - Required - HTML content to sent. - **headers** (IEnumerable) - Optional - HTTP response headers. - **closeServerConnection** (Boolean) - Optional - Close the server connection used by request if any? ``` -------------------------------- ### Capacity Property Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Http2.Hpack.DynamicTable.html Gets the maximum allowable size of the dynamic table. ```APIDOC ## Capacity ### Description Return the maximum allowable size of the dynamic table. ### Property Value - **Capacity** (Int32) - Description: The capacity. ``` -------------------------------- ### Url Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Http.Request.html Gets or sets the request URL as it appears in the HTTP header. ```APIDOC ## Url ### Description Gets or sets the URL of the request as it is formatted in the HTTP header. ### Property Value Type: [String](https://learn.microsoft.com/dotnet/api/system.string) Description: The request URL string from the HTTP header. ``` -------------------------------- ### Ok(String, IDictionary, Boolean) Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.EventArguments.SessionEventArgs.html Responds to the client with the specified HTML string and headers, ignoring the original request. Optionally closes the server connection. ```APIDOC ## Ok(String, IDictionary, Boolean) ### Description Before the request is made to the server, respond with the specified HTML string to the client and ignore the request. This overload is useful for sending simple HTML responses. ### Method `Ok` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **html** (String) - Required - HTML content to sent. - **headers** (IDictionary) - Required - HTTP response headers. - **closeServerConnection** (Boolean) - Optional - Close the server connection used by request if any? ``` -------------------------------- ### RequestUri Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Http.Request.html Gets or sets the Uniform Resource Identifier (URI) of the request. ```APIDOC ## RequestUri ### Description Gets or sets the Uniform Resource Identifier (URI) for the current request. ### Property Value Type: [Uri](https://learn.microsoft.com/dotnet/api/system.uri) Description: The URI of the request. ``` -------------------------------- ### OkResponse Constructors Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Http.Responses.OkResponse.html Provides documentation for the constructors of the OkResponse class. ```APIDOC ## OkResponse() ### Description Constructor for OkResponse. ### Method Constructor ### Parameters None ### Response #### Success Response An instance of OkResponse. ## OkResponse(Byte[] body) ### Description Constructor for OkResponse with a specified body. ### Method Constructor ### Parameters #### Path Parameters - **body** (Byte[]) - Required - The response body as a byte array. ``` -------------------------------- ### HeaderText Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Http.RequestResponseBase.html Gets the header text of the HTTP message. This is a read-only property. ```APIDOC ## HeaderText ### Description The header text of the HTTP message. ### Declaration ```csharp public abstract string HeaderText { get; } ``` ### Property Value Type: [String](https://learn.microsoft.com/dotnet/api/system.string) Description: The header text. ``` -------------------------------- ### SessionId Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.StreamExtended.ServerHelloInfo.html Gets the session ID returned by the server in the Server Hello message. ```APIDOC ## SessionId ### Description Gets the session ID returned by the server in the Server Hello message. ### Property Value - **Type**: Byte[] - **Description**: The session identifier for resuming a previous session. ``` -------------------------------- ### LoadRootCertificate(String, String, Boolean, X509KeyStorageFlags) Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Network.CertificateManager.html Manually loads a root certificate from a specified .pfx file path with optional password and storage flag configuration. ```APIDOC ## LoadRootCertificate(String, String, Boolean, X509KeyStorageFlags) ### Description Manually load a Root certificate file from give path (.pfx file). ### Declaration ```csharp public bool LoadRootCertificate(string pfxFilePath, string password, bool overwritePfXFile = true, X509KeyStorageFlags storageFlag = X509KeyStorageFlags.Exportable) ``` ### Parameters #### Path Parameters - **pfxFilePath** (string) - Required - Set the name(path) of the .pfx file. If it is string.Empty Root certificate file will be named as "rootCert.pfx" (and will be saved in proxy dll directory). - **password** (string) - Required - Set a password for the .pfx file. - **overwritePfXFile** (boolean) - Optional - true : replace an existing .pfx file if password is incorrect or if RootCertificate==null. - **storageFlag** (X509KeyStorageFlags) - Optional - Specifies the storage location and behavior for the certificate's private key. ### Returns - **Boolean**: true if succeeded, else false. ``` -------------------------------- ### HttpHeader Constructor Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Models.HttpHeader.html Initializes a new instance of the HttpHeader class with a specified name and value. ```APIDOC ## HttpHeader(String, String) ### Description Initializes a new instance of the HttpHeader class. ### Method Constructor ### Parameters #### Parameters - **name** (String) - Required - Header name. - **value** (String) - Required - Header value. ``` -------------------------------- ### PfxFilePath Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Network.CertificateManager.html Name(path) of the Root certificate file. Set the name(path) of the .pfx file. If it is string.Empty Root certificate file will be named as "rootCert.pfx" (and will be saved in proxy dll directory). ```APIDOC ## PfxFilePath ### Description Name or path of the Root certificate file. If set to an empty string, the Root certificate file will be named "rootCert.pfx" and saved in the proxy DLL directory. ### Property Value - **Type**: [String](https://learn.microsoft.com/dotnet/api/system.string) - **Description**: The path to the PFX certificate file. ``` -------------------------------- ### CreateServerCertificate Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Network.CertificateManager.html Creates a server certificate that is signed by the root certificate. ```APIDOC ## CreateServerCertificate(String) ### Description Creates a server certificate signed by the root certificate. ### Method public async Task CreateServerCertificate(string certificateName) ### Endpoint N/A (Method Call) ### Parameters #### Path Parameters - **certificateName** (String) - Description of the certificate name. ### Returns - **Task** - The created server certificate. ``` -------------------------------- ### ServerConnectionId Property Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.html Gets the unique identifier for the server connection associated with this session. ```APIDOC ## ServerConnectionId Property ### Description Gets the unique identifier for the server connection associated with this session. ### Property Value Type: [Guid](https://learn.microsoft.com/dotnet/api/system.guid) Description: The unique identifier of the server connection. ``` -------------------------------- ### EnableWinAuth Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.html Enables or disables Windows Authentication (NTLM/Kerberos) for the current session. ```APIDOC ## Property: EnableWinAuth ### Description Controls whether Windows Authentication (NTLM or Kerberos) is enabled for the current proxy session. ### Declaration ```csharp public bool EnableWinAuth { get; set; } ``` ### Property Value - **Type**: [Boolean](https://learn.microsoft.com/dotnet/api/system.boolean) - **Description**: Set to `true` to enable Windows Authentication, `false` otherwise. ``` -------------------------------- ### Ref Class Overview Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Helpers.Ref-1.html This snippet provides an overview of the Ref class, including its constructors, properties, methods, and operators. ```APIDOC ## Class Ref This class represents a generic reference type that can hold a value of type T. ### Constructors #### Ref() Initializes a new instance of the `Ref` class with a default value. #### Ref(T value) Initializes a new instance of the `Ref` class with the specified value. * **value** (T) - The value to be stored in the reference. ### Properties #### Value Gets or sets the value of the reference. * **Type**: T ### Methods #### ToString() Returns a string representation of the referenced value. * **Returns**: System.String ### Operators #### Implicit(T to Ref) Converts a value of type T to a `Ref`. * **value** (T) - The value to convert. * **Returns**: Ref #### Implicit(Ref to T) Converts a `Ref` to its underlying value of type T. * **r** (Ref) - The reference to convert. * **Returns**: T ``` -------------------------------- ### RequestUriString Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Http.Request.html Gets or sets the request URI exactly as it appears in the HTTP header. ```APIDOC ## RequestUriString ### Description Retrieves the request URI as it was originally present in the HTTP header. ### Property Value Type: [String](https://learn.microsoft.com/dotnet/api/system.string) Description: The request URI string from the HTTP header. ``` -------------------------------- ### MaxHeaderTableSize Property Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Http2.Hpack.Encoder.html Gets the maximum size of the header table that the encoder can use. ```APIDOC ## MaxHeaderTableSize Property ### Description Gets the the maximum table size. ### Property Value Type: Int32 Description: The max header table size. ### Declaration ```csharp public int MaxHeaderTableSize { get; } ``` ``` -------------------------------- ### ProxyServer Class Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.html The ProxyServer class is the central component for creating and managing proxy server instances. Users can instantiate this class to set up a proxy, but should ensure unique listening ports for each instance to avoid conflicts. ```APIDOC ## Class: ProxyServer ### Description This class is the backbone of the proxy. One can create as many instances as needed. However, care should be taken to avoid using the same listening ports across multiple instances. ### Methods (No specific methods are documented in the provided text for direct user invocation.) ### Events (No specific events are documented in the provided text for direct user invocation.) ### Properties (No specific properties are documented in the provided text for direct user invocation.) ``` -------------------------------- ### Random Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.StreamExtended.ServerHelloInfo.html Gets the random byte array sent by the server in the Server Hello message. ```APIDOC ## Random ### Description Gets the random byte array sent by the server in the Server Hello message. ### Property Value - **Type**: Byte[] - **Description**: A random byte array generated by the server. ``` -------------------------------- ### RestoreOriginalProxySettings() Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.ProxyServer.html Restores the system's proxy settings to their original configuration prior to the proxy server's activation. ```APIDOC ## RestoreOriginalProxySettings() ### Description Restores the original proxy settings. ### Method public void RestoreOriginalProxySettings() ``` -------------------------------- ### EnableTcpServerConnectionPrefetch Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.ProxyServer.html Controls whether the proxy should proactively establish server connections when a client connects. This can improve performance by having server connections ready. ```APIDOC ## EnableTcpServerConnectionPrefetch ### Description Should we enable tcp server connection prefetching? When enabled, as soon as we receive a client connection we concurrently initiate corresponding server connection process using CONNECT hostname or SNI hostname on a separate task so that after parsing client request we will have the server connection immediately ready or in the process of getting ready. If a server connection is available in cache then this prefetch task will immediately return with the available connection from cache. Defaults to true. ### Property `EnableTcpServerConnectionPrefetch` (Boolean) - Gets or sets a value indicating whether to enable TCP server connection prefetching. ``` -------------------------------- ### ClientEndPoint Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.html Gets the client's endpoint. This property is obsolete and ClientRemoteEndPoint should be used instead. ```APIDOC ## ClientEndPoint ### Description Gets the client's endpoint. This property is obsolete and ClientRemoteEndPoint should be used instead. ### Property Value Type: [IPEndPoint](https://learn.microsoft.com/dotnet/api/system.net.ipendpoint) ### Declaration ```csharp [Obsolete("Use ClientRemoteEndPoint instead.")] public IPEndPoint ClientEndPoint { get; } ``` ``` -------------------------------- ### Size Property Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Http2.Hpack.DynamicTable.html Gets the current size of the dynamic table, which is the sum of the sizes of its entries. ```APIDOC ## Size ### Description Return the current size of the dynamic table. This is the sum of the size of the entries. ### Property Value - **Size** (Int32) - Description: The size. ``` -------------------------------- ### ExternalProxy Constructors Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Models.ExternalProxy.html Provides constructors for initializing an ExternalProxy object with different levels of detail, including host, port, and optional authentication credentials. ```APIDOC ## ExternalProxy() ### Description Initializes a new instance of the ExternalProxy class with default settings. ### Method Constructor ### Parameters None ### Response Example ```json { "message": "ExternalProxy instance created" } ``` ``` ```APIDOC ## ExternalProxy(String hostName, Int32 port) ### Description Initializes a new instance of the ExternalProxy class with the specified host name and port. ### Method Constructor ### Parameters #### Path Parameters - **hostName** (string) - Required - Name of the host. - **port** (int) - Required - The port number. ### Response Example ```json { "message": "ExternalProxy instance created with host and port" } ``` ``` ```APIDOC ## ExternalProxy(String hostName, Int32 port, String userName, String password) ### Description Initializes a new instance of the ExternalProxy class with the specified host name, port, user name, and password for authentication. ### Method Constructor ### Parameters #### Path Parameters - **hostName** (string) - Required - Name of the host. - **port** (int) - Required - The port number. - **userName** (string) - Required - Name of the user for authentication. - **password** (string) - Required - The password for authentication. ### Response Example ```json { "message": "ExternalProxy instance created with host, port, and credentials" } ``` ``` -------------------------------- ### SessionEventArgsBase Class Documentation Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.html Provides information about a single proxy session, including details about the client connection and any associated exceptions. ```APIDOC ## Class SessionEventArgsBase Holds info related to a single proxy session (single request/response sequence). A proxy session is bounded to a single connection from client. A proxy session ends when client terminates connection to proxy or when server terminates connection from proxy. ### Inheritance - Object - EventArgs - ProxyEventArgsBase - SessionEventArgsBase ### Implements - IDisposable ### Fields #### BufferPool - **Type**: IBufferPool - **Description**: Manages the buffer pool for session data. #### ExceptionFunc - **Type**: ExceptionHandler - **Description**: Handles exceptions that occur during the session. ### Properties #### ClientConnectionId - **Description**: Gets the unique identifier for the client connection associated with this session. ``` -------------------------------- ### IsChunked Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Http.RequestResponseBase.html Gets or sets a value indicating whether the body is sent in chunks. This property is settable. ```APIDOC ## IsChunked ### Description Is body send as chunked bytes. ### Declaration ```csharp public bool IsChunked { get; set; } ``` ### Property Value Type: [Boolean](https://learn.microsoft.com/dotnet/api/system.boolean) Description: True if the body is chunked, false otherwise. ``` -------------------------------- ### HttpVersion Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Http.RequestResponseBase.html Gets or sets the HTTP version of the message. This property allows modification of the HTTP version. ```APIDOC ## HttpVersion ### Description Gets or sets the HTTP version of the message. ### Declaration ```csharp public Version HttpVersion { get; set; } ``` ### Property Value Type: [Version](https://learn.microsoft.com/dotnet/api/system.version) Description: The HTTP version. ``` -------------------------------- ### RootCertificateIssuerName Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Network.CertificateManager.html Gets or sets the name of the root certificate issuer. This is only used if the RootCertificate property is not explicitly set. ```APIDOC ## RootCertificateIssuerName ### Description Name of the root certificate issuer. This property is only valid when the `RootCertificate` property is not set. ### Property Value * **Type**: String * **Description**: The issuer name for the root certificate. ``` -------------------------------- ### EnsureRootCertificate(Boolean, Boolean, Boolean) Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Network.CertificateManager.html Ensures that the necessary root certificates are set up with specific trust configurations. This method creates the root certificate if it doesn't exist and allows explicit control over user and machine trust, with an option to use elevated permissions. ```APIDOC ## EnsureRootCertificate(Boolean, Boolean, Boolean) ### Description Ensures certificates are setup (creates root if required). Also makes root certificate trusted based on provided parameters. Note: setting machineTrustRootCertificate to true will force userTrustRootCertificate to true. ### Method public void EnsureRootCertificate(bool userTrustRootCertificate, bool machineTrustRootCertificate, bool trustRootCertificateAsAdmin = false) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **userTrustRootCertificate** (Boolean) - Description: Should fake HTTPS certificate be trusted by this machine's user certificate store? - **machineTrustRootCertificate** (Boolean) - Description: Should fake HTTPS certificate be trusted by this machine's certificate store? - **trustRootCertificateAsAdmin** (Boolean) - Description: Should we attempt to trust certificates with elevated permissions by prompting for UAC if required? ``` -------------------------------- ### SocksProxyEndPoint Constructor Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Models.SocksProxyEndPoint.html Initializes a new instance of the SocksProxyEndPoint class with the specified IP address, port, and SSL decryption setting. ```APIDOC ## SocksProxyEndPoint(IPAddress, Int32, Boolean) ### Description Initializes a new instance of the SocksProxyEndPoint class. ### Method Constructor ### Parameters #### Parameters - **ipAddress** (IPAddress) - Description: Listening Ip address. - **port** (Int32) - Description: Listening port. - **decryptSsl** (Boolean) - Optional - Description: Should we decrypt ssl? Defaults to true. ``` -------------------------------- ### Host Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Http.Request.html Gets or sets the HTTP hostname header value. Note: Changing this does not change the host in RequestUri. ```APIDOC ## Host ### Description Http hostname header value if exists. Note: Changing this does NOT change host in RequestUri. Users can set new RequestUri separately. ### Property Value Type: String Description: The HTTP hostname header value. ``` -------------------------------- ### RootCertificateName Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Network.CertificateManager.html Gets or sets the name for the root certificate. If not provided, a default name will be used, and a 'rootCert.pfx' file will be created. ```APIDOC ## RootCertificateName ### Description Name of the root certificate. If no certificate is provided then a default Root Certificate will be created and used. The provided root certificate will be stored in the proxy exe directory with the private key. The root certificate file will be named as "rootCert.pfx". This property is only valid when the `RootCertificate` property is not set. ### Property Value * **Type**: String * **Description**: The name for the root certificate. ``` -------------------------------- ### LoadRootCertificate Method Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Network.ICertificateCache.html Loads the root certificate from the storage using its path or name, password, and key storage flags. ```APIDOC ## LoadRootCertificate(String, String, X509KeyStorageFlags) ### Description Loads the root certificate from the storage. ### Method X509Certificate2 LoadRootCertificate(string pathOrName, string password, X509KeyStorageFlags storageFlags) ### Parameters #### Path Parameters * **pathOrName** (string) - The path or name of the root certificate file. * **password** (string) - The password for accessing the certificate. * **storageFlags** (X509KeyStorageFlags) - Flags that specify how the private key is stored or accessed. ### Returns * **X509Certificate2** - The loaded root certificate, or null if not found. ``` -------------------------------- ### PfxPassword Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Network.CertificateManager.html Gets or sets the password for the .pfx root certificate file. This is required if you are providing a custom .pfx file. ```APIDOC ## PfxPassword ### Description Password of the Root certificate file. Set a password for the .pfx file. ### Property Value * **Type**: String * **Description**: The password for the .pfx certificate file. ``` -------------------------------- ### EnableTcpServerConnectionPrefetch Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.ProxyServer.html This property is not fully documented in the provided text. It likely relates to prefetching TCP server connections. ```APIDOC ## EnableTcpServerConnectionPrefetch ### Description This property is not fully documented in the provided text. It likely relates to prefetching TCP server connections. ### Declaration public bool EnableTcpServerConnectionPrefetch { get; set; } ### Property Value Type Description [Boolean](https://learn.microsoft.com/dotnet/api/system.boolean) ``` -------------------------------- ### Succeeded() Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Models.ProxyAuthenticationContext.html Creates a ProxyAuthenticationContext instance indicating a successful authentication. ```APIDOC ## Succeeded() ### Description Creates a ProxyAuthenticationContext instance indicating a successful authentication. ### Method static ProxyAuthenticationContext ### Returns Type: [ProxyAuthenticationContext](Titanium.Web.Proxy.Models.ProxyAuthenticationContext.html) Description: A ProxyAuthenticationContext object representing a successful authentication. ``` -------------------------------- ### LocalEndPoint Property (Obsolete) Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.html Gets the local endpoint through which the request was made. This property is obsolete and ProxyEndPoint should be used instead. ```APIDOC ## LocalEndPoint Property ### Description Gets the local endpoint via which the request was made. ### Note This property is obsolete. Use `ProxyEndPoint` instead. ### Property Value Type: [ProxyEndPoint](Titanium.Web.Proxy.Models.ProxyEndPoint.html) Description: The local endpoint configuration. ``` -------------------------------- ### EnableWinAuth Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.ProxyServer.html Enables or disables Windows Authentication (NTLM/Kerberos) for the proxy. When enabled, it uses the credentials of the user running the proxy process. ```APIDOC ## EnableWinAuth ### Description Enable disable Windows Authentication (NTLM/Kerberos). Note: NTLM/Kerberos will always send local credentials of current user running the proxy process. This is because a man in middle attack with Windows domain authentication is not currently supported. Defaults to false. ### Property `EnableWinAuth` (Boolean) - Gets or sets a value indicating whether to enable Windows Authentication. ``` -------------------------------- ### KeepBody Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Http.RequestResponseBase.html Gets or sets a value indicating whether to keep the body data after the session is finished. This property is settable. ```APIDOC ## KeepBody ### Description Keeps the body data after the session is finished. ### Declaration ```csharp public bool KeepBody { get; set; } ``` ### Property Value Type: [Boolean](https://learn.microsoft.com/dotnet/api/system.boolean) Description: True to keep the body data, false otherwise. ``` -------------------------------- ### ExternalProxy Methods Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Models.ExternalProxy.html This section details the methods available for the ExternalProxy class. Currently, only the ToString() method is documented. ```APIDOC ## ExternalProxy Methods ### ToString() **Description:** Returns a string representation of the proxy in 'Hostname:port' format. **Declaration:** `public override string ToString()` **Returns:** - **Type:** [String](https://learn.microsoft.com/dotnet/api/system.string) - **Description:** A string representing the proxy's hostname and port. ``` -------------------------------- ### TransparentProxyEndPoint.GenericCertificateName Property Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Models.TransparentProxyEndPoint.html Gets or sets the name of the certificate to be sent, which should match the hostname being proxied. This is only applicable when UseServerNameIndication is set to false. ```APIDOC ## TransparentProxyEndPoint.GenericCertificateName ### Description Name of the Certificate need to be sent (same as the hostname we want to proxy). This is valid only when UseServerNameIndication is set to false. ### Property Value - **GenericCertificateName** (String) - The name of the certificate. ``` -------------------------------- ### ClientHelloInfo Properties Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.StreamExtended.ClientHelloInfo.html Provides access to various properties of the client's SSL hello information. ```APIDOC ## ClientHelloInfo ### Description Wraps up the client SSL hello information. ### Properties #### Ciphers - **Declaration**: `public int[] Ciphers { get; }` - **Description**: An array of integers representing the supported cipher suites by the client. #### CompressionData - **Declaration**: `public byte[] CompressionData { get; }` - **Description**: A byte array containing compression data sent by the client. #### Extensions - **Declaration**: `public Dictionary Extensions { get; set; }` - **Description**: A dictionary containing SSL extensions, where the key is the extension name (string) and the value is the `SslExtension` object. #### HandshakeVersion - **Declaration**: `public Version HandshakeVersion { get; }` - **Description**: The version of the SSL/TLS handshake protocol used by the client. ``` -------------------------------- ### UserData Property Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.html Gets or sets user-defined data associated with the request/response session, mirroring the HttpClient's user data. ```APIDOC ## UserData Property ### Description Returns a user data for this request/response session which is same as the user data of HttpClient. ### Declaration ```csharp public object UserData { get; set; } ``` ### Property Value Type: [Object](https://learn.microsoft.com/dotnet/api/system.object) Description: User-specific data for the session. ``` -------------------------------- ### SocksProxyEndPoint.GenericCertificateName Property Source: https://github.com/justcoding121/titanium-web-proxy/blob/develop/docs/api/Titanium.Web.Proxy.Models.SocksProxyEndPoint.html Gets or sets the name of the certificate to be sent, which should match the hostname being proxied. This property is only relevant when UseServerNameIndication is set to false. ```APIDOC ## SocksProxyEndPoint.GenericCertificateName Property ### Description Name of the Certificate need to be sent (same as the hostname we want to proxy). This is valid only when UseServerNameIndication is set to false. ### Property Value - **String** - Description: The name of the generic certificate. ```