"title":"Delegate AsyncEventHandler<TEventArgs> | Titanium Web Proxy",
"title":"Delegate AsyncEventHandler<TEventArgs> | Titanium Web Proxy",
"keywords":"Delegate AsyncEventHandler<TEventArgs> Namespace : Titanium.Web.Proxy.EventArguments Assembly : Titanium.Web.Proxy.dll Syntax public delegate Task AsyncEventHandler<in TEventArgs>(object sender, TEventArgs e); Parameters Type Name Description Object sender TEventArgs e Returns Type Description Task Type Parameters Name Description TEventArgs"
"keywords":"Delegate AsyncEventHandler<TEventArgs> A generic asynchronous event handler used by this proxy. Namespace : Titanium.Web.Proxy.EventArguments Assembly : Titanium.Web.Proxy.dll Syntax public delegate Task AsyncEventHandler<in TEventArgs>(object sender, TEventArgs e); Parameters Type Name Description Object sender The proxy server instance. TEventArgs e The event arguments. Returns Type Description Task Type Parameters Name Description TEventArgs"
"title":"Class BeforeSslAuthenticateEventArgs | Titanium Web Proxy",
"title":"Class BeforeSslAuthenticateEventArgs | Titanium Web Proxy",
"keywords":"Class BeforeSslAuthenticateEventArgs Inheritance Object EventArgs BeforeSslAuthenticateEventArgs Inherited Members EventArgs.Empty Object.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.EventArguments Assembly : Titanium.Web.Proxy.dll Syntax public class BeforeSslAuthenticateEventArgs : EventArgs Properties DecryptSsl Declaration public bool DecryptSsl { get; set; } Property Value Type Description Boolean SniHostName Declaration public string SniHostName { get; } Property Value Type Description String Methods TerminateSession() Declaration public void TerminateSession()"
"keywords":"Class BeforeSslAuthenticateEventArgs This is used in transparent endpoint before authenticating client. Inheritance Object EventArgs BeforeSslAuthenticateEventArgs Inherited Members EventArgs.Empty Object.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.EventArguments Assembly : Titanium.Web.Proxy.dll Syntax public class BeforeSslAuthenticateEventArgs : EventArgs Properties DecryptSsl Should we decrypt the SSL request? If true we decrypt with fake certificate. If false we relay the connection to the hostname mentioned in SniHostname. Declaration public bool DecryptSsl { get; set; } Property Value Type Description Boolean SniHostName The server name indication hostname. Declaration public string SniHostName { get; } Property Value Type Description String Methods TerminateSession() Terminate the request abruptly. Declaration public void TerminateSession()"
"title":"Class CertificateSelectionEventArgs | Titanium Web Proxy",
"title":"Class CertificateSelectionEventArgs | Titanium Web Proxy",
"keywords":"Class CertificateSelectionEventArgs An argument passed on to user for client certificate selection during mutual SSL authentication Inheritance Object EventArgs CertificateSelectionEventArgs Inherited Members EventArgs.Empty Object.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.EventArguments Assembly : Titanium.Web.Proxy.dll Syntax public class CertificateSelectionEventArgs : EventArgs Properties AcceptableIssuers Acceptable issuers. Declaration public string[] AcceptableIssuers { get; } Property Value Type Description String [] ClientCertificate Client Certificate. Declaration public X509Certificate ClientCertificate { get; set; } Property Value Type Description X509Certificate LocalCertificates Local certificates. Declaration public X509CertificateCollection LocalCertificates { get; } Property Value Type Description X509CertificateCollection RemoteCertificate Remote certificate. Declaration public X509Certificate RemoteCertificate { get; } Property Value Type Description X509Certificate Sender Sender object. Declaration public object Sender { get; } Property Value Type Description Object TargetHost Target host. Declaration public string TargetHost { get; } Property Value Type Description String"
"keywords":"Class CertificateSelectionEventArgs An argument passed on to user for client certificate selection during mutual SSL authentication. Inheritance Object EventArgs CertificateSelectionEventArgs Inherited Members EventArgs.Empty Object.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.EventArguments Assembly : Titanium.Web.Proxy.dll Syntax public class CertificateSelectionEventArgs : EventArgs Properties AcceptableIssuers Acceptable issuers mentioned by server. Declaration public string[] AcceptableIssuers { get; } Property Value Type Description String [] ClientCertificate Client Certificate we selected. Declaration public X509Certificate ClientCertificate { get; set; } Property Value Type Description X509Certificate LocalCertificates Local certificates with matching issuers. Declaration public X509CertificateCollection LocalCertificates { get; } Property Value Type Description X509CertificateCollection RemoteCertificate Remote certificate of the server. Declaration public X509Certificate RemoteCertificate { get; } Property Value Type Description X509Certificate Sender The proxy server instance. Declaration public object Sender { get; } Property Value Type Description Object TargetHost The host to which we are authenticating against. Declaration public string TargetHost { get; } Property Value Type Description String"
"title":"Class CertificateValidationEventArgs | Titanium Web Proxy",
"title":"Class CertificateValidationEventArgs | Titanium Web Proxy",
"keywords":"Class CertificateValidationEventArgs An argument passed on to the user for validating the server certificate during SSL authentication Inheritance Object EventArgs CertificateValidationEventArgs Inherited Members EventArgs.Empty Object.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.EventArguments Assembly : Titanium.Web.Proxy.dll Syntax public class CertificateValidationEventArgs : EventArgs Properties Certificate Certificate Declaration public X509Certificate Certificate { get; } Property Value Type Description X509Certificate Chain Certificate chain Declaration public X509Chain Chain { get; } Property Value Type Description X509Chain IsValid is a valid certificate? Declaration public bool IsValid { get; set; } Property Value Type Description Boolean SslPolicyErrors SSL policy errors. Declaration public SslPolicyErrors SslPolicyErrors { get; } Property Value Type Description SslPolicyErrors"
"keywords":"Class CertificateValidationEventArgs An argument passed on to the user for validating the server certificate during SSL authentication. Inheritance Object EventArgs CertificateValidationEventArgs Inherited Members EventArgs.Empty Object.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.EventArguments Assembly : Titanium.Web.Proxy.dll Syntax public class CertificateValidationEventArgs : EventArgs Properties Certificate Server certificate. Declaration public X509Certificate Certificate { get; } Property Value Type Description X509Certificate Chain Certificate chain. Declaration public X509Chain Chain { get; } Property Value Type Description X509Chain IsValid Is the given server certificate is valid? Declaration public bool IsValid { get; set; } Property Value Type Description Boolean SslPolicyErrors SSL policy errors. Declaration public SslPolicyErrors SslPolicyErrors { get; } Property Value Type Description SslPolicyErrors"
"title":"Class DataEventArgs | Titanium Web Proxy",
"title":"Class DataEventArgs | Titanium Web Proxy",
"keywords":"Class DataEventArgs Inheritance Object EventArgs DataEventArgs Inherited Members EventArgs.Empty Object.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.EventArguments Assembly : Titanium.Web.Proxy.dll Syntax public class DataEventArgs : EventArgs Properties Buffer Declaration public byte[] Buffer { get; } Property Value Type Description System.Byte [] Count Declaration public int Count { get; } Property Value Type Description Int32 Offset Declaration public int Offset { get; } Property Value Type Description Int32"
"keywords":"Class DataEventArgs Wraps the data sent/received by a proxy server instance. Inheritance Object EventArgs DataEventArgs Inherited Members EventArgs.Empty Object.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.EventArguments Assembly : Titanium.Web.Proxy.dll Syntax public class DataEventArgs : EventArgs Properties Buffer The buffer with data. Declaration public byte[] Buffer { get; } Property Value Type Description System.Byte [] Count Length from offset in Buffer with valid data. Declaration public int Count { get; } Property Value Type Description Int32 Offset Offset in Buffer where valid data begins. Declaration public int Offset { get; } Property Value Type Description Int32"
"title":"Namespace Titanium.Web.Proxy.EventArguments | Titanium Web Proxy",
"title":"Namespace Titanium.Web.Proxy.EventArguments | Titanium Web Proxy",
"keywords":"Namespace Titanium.Web.Proxy.EventArguments Classes BeforeSslAuthenticateEventArgs CertificateSelectionEventArgs An argument passed on to user for client certificate selection during mutual SSL authentication CertificateValidationEventArgs An argument passed on to the user for validating the server certificate during SSL authentication DataEventArgs MultipartRequestPartSentEventArgs SessionEventArgs 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 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 TunnelConnectSessionEventArgs Delegates AsyncEventHandler<TEventArgs>"
"keywords":"Namespace Titanium.Web.Proxy.EventArguments Classes BeforeSslAuthenticateEventArgs This is used in transparent endpoint before authenticating client. CertificateSelectionEventArgs An argument passed on to user for client certificate selection during mutual SSL authentication. CertificateValidationEventArgs An argument passed on to the user for validating the server certificate during SSL authentication. DataEventArgs Wraps the data sent/received by a proxy server instance. MultipartRequestPartSentEventArgs Class that wraps the multipart sent request arguments. SessionEventArgs 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. 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 TunnelConnectSessionEventArgs Delegates AsyncEventHandler<TEventArgs> A generic asynchronous event handler used by this proxy."
"title":"Class SessionEventArgs | Titanium Web Proxy",
"title":"Class SessionEventArgs | Titanium Web Proxy",
"keywords":"Class SessionEventArgs 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 SessionEventArgsBase SessionEventArgs Implements IDisposable Inherited Members SessionEventArgsBase.BufferSize SessionEventArgsBase.ExceptionFunc SessionEventArgsBase.Id SessionEventArgsBase.IsHttps SessionEventArgsBase.ClientEndPoint SessionEventArgsBase.WebSession SessionEventArgsBase.CustomUpStreamProxyUsed SessionEventArgsBase.LocalEndPoint SessionEventArgsBase.IsTransparent SessionEventArgsBase.Exception SessionEventArgsBase.DataSent SessionEventArgsBase.DataReceived SessionEventArgsBase.TerminateSession() EventArgs.Empty Object.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.EventArguments Assembly : Titanium.Web.Proxy.dll Syntax public class SessionEventArgs : SessionEventArgsBase, IDisposable Constructors SessionEventArgs(Int32, ProxyEndPoint, Request, CancellationTokenSource, ExceptionHandler) Declaration protected SessionEventArgs(int bufferSize, ProxyEndPoint endPoint, Request request, CancellationTokenSource cancellationTokenSource, ExceptionHandler exceptionFunc) Parameters Type Name Description Int32 bufferSize ProxyEndPoint endPoint Request request CancellationTokenSource cancellationTokenSource ExceptionHandler exceptionFunc Properties ReRequest Should we send the request again Declaration public bool ReRequest { get; set; } Property Value Type Description Boolean Methods Dispose() implement any cleanup here Declaration public override void Dispose() Overrides SessionEventArgsBase.Dispose() GenericResponse(Byte[], HttpStatusCode, Dictionary<String, HttpHeader>) Before request is made to server Respond with the specified byte[] to client and the specified status and ignore the request Declaration public void GenericResponse(byte[] result, HttpStatusCode status, Dictionary<string, HttpHeader> headers) Parameters Type Name Description System.Byte [] result HttpStatusCode status Dictionary < String , HttpHeader > headers GenericResponse(String, HttpStatusCode, Dictionary<String, HttpHeader>) Before request is made to server Respond with the specified HTML string to client and the specified status and ignore the request Declaration public void GenericResponse(string html, HttpStatusCode status, Dictionary<string, HttpHeader> headers = null) Parameters Type Name Description String html HttpStatusCode status Dictionary < String , HttpHeader > headers GetRequestBody(CancellationToken) Gets the request body as bytes Declaration public Task<byte[]> GetRequestBody(CancellationToken cancellationToken = default(CancellationToken)) Parameters Type Name Description CancellationToken cancellationToken Returns Type Description Task < System.Byte []> GetRequestBodyAsString(CancellationToken) Gets the request body as string Declaration public Task<string> GetRequestBodyAsString(CancellationToken cancellationToken = default(CancellationToken)) Parameters Type Name Description CancellationToken cancellationToken Returns Type Description Task < String > GetResponseBody(CancellationToken) Gets the response body as byte array Declaration public Task<byte[]> GetResponseBody(CancellationToken cancellationToken = default(CancellationToken)) Parameters Type Name Description CancellationToken cancellationToken Returns Type Description Task < System.Byte []> GetResponseBodyAsString(CancellationToken) Gets the response body as string Declaration public Task<string> GetResponseBodyAsString(CancellationToken cancellationToken = default(CancellationToken)) Parameters Type Name Description CancellationToken cancellationToken Returns Type Description Task < String > Ok(Byte[], Dictionary<String, HttpHeader>) Before request is made to server Respond with the specified byte[] to client and ignore the request Declaration public void Ok(byte[] result, Dictionary<string, HttpHeader> headers = null) Parameters Type Name Description System.Byte [] result Dictionary < String , HttpHeader > headers Ok(String, Dictionary<String, HttpHeader>) Before request is made to server Respond with the specified HTML string to client and ignore the request Declaration public void Ok(string html, Dictionary<string, HttpHeader> headers = null) Parameters Type Name Description String html Dictionary < String , HttpHeader > headers Redirect(String) Redirect to URL. Declaration public void Redirect(string url) Parameters Type Name Description String url Respond(Response) Declaration public void Respond(Response response) Parameters Type Name Description Response response SetRequestBody(Byte[]) Sets the request body Declaration public void SetRequestBody(byte[] body) Parameters Type Name Description System.Byte [] body SetRequestBodyString(String) Sets the body with the specified string Declaration public void SetRequestBodyString(string body) Parameters Type Name Description String body SetResponseBody(Byte[]) Set the response body bytes Declaration public void SetResponseBody(byte[] body) Parameters Type Name Description System.Byte [] body SetResponseBodyString(String) Replace the response body with the specified string Declaration public void SetResponseBodyString(string body) Parameters Type Name Description String body TerminateServerConnection() Declaration public void TerminateServerConnection() Events MultipartRequestPartSent Occurs when multipart request part sent. Declaration public event EventHandler<MultipartRequestPartSentEventArgs> MultipartRequestPartSent Event Type Type Description EventHandler < MultipartRequestPartSentEventArgs > Implements System.IDisposable"
"keywords":"Class SessionEventArgs 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 SessionEventArgsBase SessionEventArgs Implements IDisposable Inherited Members SessionEventArgsBase.BufferSize SessionEventArgsBase.ExceptionFunc SessionEventArgsBase.Id SessionEventArgsBase.IsHttps SessionEventArgsBase.ClientEndPoint SessionEventArgsBase.WebSession SessionEventArgsBase.CustomUpStreamProxyUsed SessionEventArgsBase.LocalEndPoint SessionEventArgsBase.IsTransparent SessionEventArgsBase.Exception SessionEventArgsBase.DataSent SessionEventArgsBase.DataReceived SessionEventArgsBase.TerminateSession() EventArgs.Empty Object.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.EventArguments Assembly : Titanium.Web.Proxy.dll Syntax public class SessionEventArgs : SessionEventArgsBase, IDisposable Constructors SessionEventArgs(Int32, ProxyEndPoint, Request, CancellationTokenSource, ExceptionHandler) Declaration protected SessionEventArgs(int bufferSize, ProxyEndPoint endPoint, Request request, CancellationTokenSource cancellationTokenSource, ExceptionHandler exceptionFunc) Parameters Type Name Description Int32 bufferSize ProxyEndPoint endPoint Request request CancellationTokenSource cancellationTokenSource ExceptionHandler exceptionFunc Properties ReRequest Should we send the request again ? Declaration public bool ReRequest { get; set; } Property Value Type Description Boolean Methods Dispose() implement any cleanup here Declaration public override void Dispose() Overrides SessionEventArgsBase.Dispose() GenericResponse(Byte[], HttpStatusCode, Dictionary<String, HttpHeader>) Before request is made to server respond with the specified byte[], the specified status to client. And then ignore the request. Declaration public void GenericResponse(byte[] result, HttpStatusCode status, Dictionary<string, HttpHeader> headers) Parameters Type Name Description System.Byte [] result HttpStatusCode status Dictionary < String , HttpHeader > headers GenericResponse(String, HttpStatusCode, Dictionary<String, HttpHeader>) Before request is made to server respond with the specified HTML string and the specified status to client. And then ignore the request. Declaration public void GenericResponse(string html, HttpStatusCode status, Dictionary<string, HttpHeader> headers = null) Parameters Type Name Description String html HttpStatusCode status Dictionary < String , HttpHeader > headers GetRequestBody(CancellationToken) Gets the request body as bytes. Declaration public Task<byte[]> GetRequestBody(CancellationToken cancellationToken = default(CancellationToken)) Parameters Type Name Description CancellationToken cancellationToken Returns Type Description Task < System.Byte []> The body as bytes. GetRequestBodyAsString(CancellationToken) Gets the request body as string. Declaration public Task<string> GetRequestBodyAsString(CancellationToken cancellationToken = default(CancellationToken)) Parameters Type Name Description CancellationToken cancellationToken Cancellation token for this async task is optional. Returns Type Description Task < String > The body as string. GetResponseBody(CancellationToken) Gets the response body as bytes. Declaration public Task<byte[]> GetResponseBody(CancellationToken cancellationToken = default(CancellationToken)) Parameters Type Name Description CancellationToken cancellationToken Returns Type Description Task < System.Byte []> GetResponseBodyAsString(CancellationToken) Gets the response body as string. Declaration public Task<string> GetResponseBodyAsString(CancellationToken cancellationToken = default(CancellationToken)) Parameters Type Name Description CancellationToken cancellationToken Returns Type Description Task < String > The string body. Ok(Byte[], Dictionary<String, HttpHeader>) Before request is made to server respond with the specified byte[] to client and ignore the request. Declaration public void Ok(byte[] result, Dictionary<string, HttpHeader> headers = null) Parameters Type Name Description System.Byte [] result Dictionary < String , HttpHeader > headers Ok(String, Dictionary<String, HttpHeader>) Before request is made to server respond with the specified HTML string to client and ignore the request. Declaration public void Ok(string html, Dictionary<string, HttpHeader> headers = null) Parameters Type Name Description String html Dictionary < String , HttpHeader > headers Redirect(String) Redirect to provided URL. Declaration public void Redirect(string url) Parameters Type Name Description String url Respond(Response) Declaration public void Respond(Response response) Parameters Type Name Description Response response SetRequestBody(Byte[]) Sets the request body. Declaration public void SetRequestBody(byte[] body) Parameters Type Name Description System.Byte [] body The request body bytes. SetRequestBodyString(String) Sets the body with the specified string. Declaration public void SetRequestBodyString(string body) Parameters Type Name Description String body The request body string to set. SetResponseBody(Byte[]) Set the response body bytes. Declaration public void SetResponseBody(byte[] body) Parameters Type Name Description System.Byte [] body SetResponseBodyString(String) Replace the response body with the specified string. Declaration public void SetResponseBodyString(string body) Parameters Type Name Description String body TerminateServerConnection() Declaration public void TerminateServerConnection() Events MultipartRequestPartSent Occurs when multipart request part sent. Declaration public event EventHandler<MultipartRequestPartSentEventArgs> MultipartRequestPartSent Event Type Type Description EventHandler < MultipartRequestPartSentEventArgs > Implements System.IDisposable"
"title":"Delegate ExceptionHandler | Titanium Web Proxy",
"title":"Delegate ExceptionHandler | Titanium Web Proxy",
"keywords":"Delegate ExceptionHandler Namespace : Titanium.Web.Proxy Assembly : Titanium.Web.Proxy.dll Syntax public delegate void ExceptionHandler(Exception exception); Parameters Type Name Description Exception exception"
"keywords":"Delegate ExceptionHandler A delegate to catch exceptions occuring in proxy. Namespace : Titanium.Web.Proxy Assembly : Titanium.Web.Proxy.dll Syntax public delegate void ExceptionHandler(Exception exception); Parameters Type Name Description Exception exception The exception occurred in proxy."
"keywords":"Class Ref<T> Inheritance Object Ref<T> Inherited Members Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.Helpers Assembly : Titanium.Web.Proxy.dll Syntax public class Ref<T> Type Parameters Name Description T Constructors Ref() Declaration public Ref() Ref(T) Declaration public Ref(T value) Parameters Type Name Description T value Properties Value Declaration public T Value { get; set; } Property Value Type Description T Methods ToString() Declaration public override string ToString() Returns Type Description String Overrides Object.ToString() Operators Implicit(T to Ref<T>) Declaration public static implicit operator Ref<T>(T value) Parameters Type Name Description T value Returns Type Description Ref <T> Implicit(Ref<T> to T) Declaration public static implicit operator T(Ref<T> r) Parameters Type Name Description Ref <T> r Returns Type Description T"
},
"api/Titanium.Web.Proxy.html":{
"api/Titanium.Web.Proxy.html":{
"href":"api/Titanium.Web.Proxy.html",
"href":"api/Titanium.Web.Proxy.html",
"title":"Namespace Titanium.Web.Proxy | Titanium Web Proxy",
"title":"Namespace Titanium.Web.Proxy | Titanium Web Proxy",
"keywords":"Namespace Titanium.Web.Proxy Classes ProxyServer Proxy Server Main class Delegates ExceptionHandler"
"keywords":"Namespace Titanium.Web.Proxy Classes ProxyServer This object is the backbone of proxy. One can create as many instances as needed. However care should be taken to avoid using the same listening ports across multiple instances. Delegates ExceptionHandler A delegate to catch exceptions occuring in proxy."
"keywords":"Class ProxyServer Proxy Server Main class Inheritance Object ProxyServer Implements IDisposable Inherited Members Object.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy Assembly : Titanium.Web.Proxy.dll Syntax public class ProxyServer : IDisposable Constructors ProxyServer(Boolean, Boolean, Boolean) Constructor Declaration public ProxyServer(bool userTrustRootCertificate = true, bool machineTrustRootCertificate = false, bool trustRootCertificateAsAdmin = false) Parameters Type Name Description Boolean userTrustRootCertificate Boolean machineTrustRootCertificate Note:setting machineTrustRootCertificate to true will force userTrustRootCertificate to true Boolean trustRootCertificateAsAdmin ProxyServer(String, String, Boolean, Boolean, Boolean) Constructor. Declaration public ProxyServer(string rootCertificateName, string rootCertificateIssuerName, bool userTrustRootCertificate = true, bool machineTrustRootCertificate = false, bool trustRootCertificateAsAdmin = false) Parameters Type Name Description String rootCertificateName Name of root certificate. String rootCertificateIssuerName Name of root certificate issuer. Boolean userTrustRootCertificate Boolean machineTrustRootCertificate Note:setting machineTrustRootCertificate to true will force userTrustRootCertificate to true Boolean trustRootCertificateAsAdmin Properties AuthenticateUserFunc A callback to authenticate clients Parameters are username, password provided by client return true for successful authentication Declaration public Func<string, string, Task<bool>> AuthenticateUserFunc { get; set; } Property Value Type Description Func < String , String , Task < Boolean >> BufferSize Buffer size used throughout this proxy Declaration public int BufferSize { get; set; } Property Value Type Description Int32 CertificateManager Manages certificates used by this proxy Declaration public CertificateManager CertificateManager { get; } Property Value Type Description CertificateManager CheckCertificateRevocation Should we check for certificare revocation during SSL authentication to servers Note: If enabled can reduce performance (Default: NoCheck) Declaration public X509RevocationMode CheckCertificateRevocation { get; set; } Property Value Type Description X509RevocationMode ClientConnectionCount Total number of active client connections Declaration public int ClientConnectionCount { get; } Property Value Type Description Int32 ConnectionTimeOutSeconds Seconds client/server connection are to be kept alive when waiting for read/write to complete Declaration public int ConnectionTimeOutSeconds { get; set; } Property Value Type Description Int32 Enable100ContinueBehaviour Does this proxy uses the HTTP protocol 100 continue behaviour strictly? Broken 100 contunue implementations on server/client may cause problems if enabled Declaration public bool Enable100ContinueBehaviour { get; set; } Property Value Type Description Boolean EnableWinAuth Enable disable Windows Authentication (NTLM/Kerberos) Note: NTLM/Kerberos will always send local credentials of current user who is running the proxy process. This is because a man in middle attack is not currently supported (which would require windows delegation enabled for this server process) Declaration public bool EnableWinAuth { get; set; } Property Value Type Description Boolean ExceptionFunc Callback for error events in proxy Declaration public ExceptionHandler ExceptionFunc { get; set; } Property Value Type Description ExceptionHandler ForwardToUpstreamGateway Gets or sets a value indicating whether requests will be chained to upstream gateway. Declaration public bool ForwardToUpstreamGateway { get; set; } Property Value Type Description Boolean GetCustomUpStreamProxyFunc A callback to provide authentication credentials for up stream proxy this proxy is using for HTTP(S) requests return the ExternalProxy object with valid credentials Declaration public Func<SessionEventArgsBase, Task<ExternalProxy>> GetCustomUpStreamProxyFunc { get; set; } Property Value Type Description Func < SessionEventArgsBase , Task < ExternalProxy >> ProxyEndPoints A list of IpAddress and port this proxy is listening to Declaration public List<ProxyEndPoint> ProxyEndPoints { get; set; } Property Value Type Description List < ProxyEndPoint > ProxyRealm Realm used during Proxy Basic Authentication Declaration public string ProxyRealm { get; set; } Property Value Type Description String ProxyRunning Is the proxy currently running Declaration public bool ProxyRunning { get; } Property Value Type Description Boolean ServerConnectionCount Total number of active server connections Declaration public int ServerConnectionCount { get; } Property Value Type Description Int32 SupportedSslProtocols List of supported Ssl versions Declaration public SslProtocols SupportedSslProtocols { get; set; } Property Value Type Description SslProtocols UpStreamEndPoint Local adapter/NIC endpoint (where proxy makes request via) default via any IP addresses of this machine Declaration public IPEndPoint UpStreamEndPoint { get; set; } Property Value Type Description IPEndPoint UpStreamHttpProxy External proxy for Http Declaration public ExternalProxy UpStreamHttpProxy { get; set; } Property Value Type Description ExternalProxy UpStreamHttpsProxy External proxy for Http Declaration public ExternalProxy UpStreamHttpsProxy { get; set; } Property Value Type Description ExternalProxy Methods AddEndPoint(ProxyEndPoint) Add a proxy end point Declaration public void AddEndPoint(ProxyEndPoint endPoint) Parameters Type Name Description ProxyEndPoint endPoint DisableAllSystemProxies() Clear all proxy settings for current machine Declaration public void DisableAllSystemProxies() DisableSystemHttpProxy() Remove any HTTP proxy setting of current machien Declaration public void DisableSystemHttpProxy() DisableSystemHttpsProxy() Remove any HTTPS proxy setting for current machine Declaration public void DisableSystemHttpsProxy() DisableSystemProxy(ProxyProtocolType) Remove the specified proxy settings for current machine Declaration public void DisableSystemProxy(ProxyProtocolType protocolType) Parameters Type Name Description ProxyProtocolType protocolType Dispose() Dispose Proxy. Declaration public void Dispose() RemoveEndPoint(ProxyEndPoint) Remove a proxy end point Will throw error if the end point does'nt exist Declaration public void RemoveEndPoint(ProxyEndPoint endPoint) Parameters Type Name Description ProxyEndPoint endPoint SetAsSystemHttpProxy(ExplicitProxyEndPoint) Set the given explicit end point as the default proxy server for current machine Declaration public void SetAsSystemHttpProxy(ExplicitProxyEndPoint endPoint) Parameters Type Name Description ExplicitProxyEndPoint endPoint SetAsSystemHttpsProxy(ExplicitProxyEndPoint) Set the given explicit end point as the default proxy server for current machine Declaration public void SetAsSystemHttpsProxy(ExplicitProxyEndPoint endPoint) Parameters Type Name Description ExplicitProxyEndPoint endPoint SetAsSystemProxy(ExplicitProxyEndPoint, ProxyProtocolType) Set the given explicit end point as the default proxy server for current machine Declaration public void SetAsSystemProxy(ExplicitProxyEndPoint endPoint, ProxyProtocolType protocolType) Parameters Type Name Description ExplicitProxyEndPoint endPoint ProxyProtocolType protocolType Start() Start this proxy server Declaration public void Start() Stop() Stop this proxy server Declaration public void Stop() Events AfterResponse Intercept after response from server Declaration public event AsyncEventHandler<SessionEventArgs> AfterResponse Event Type Type Description AsyncEventHandler < SessionEventArgs > BeforeRequest Intercept request to server Declaration public event AsyncEventHandler<SessionEventArgs> BeforeRequest Event Type Type Description AsyncEventHandler < SessionEventArgs > BeforeResponse Intercept response from server Declaration public event AsyncEventHandler<SessionEventArgs> BeforeResponse Event Type Type Description AsyncEventHandler < SessionEventArgs > ClientCertificateSelectionCallback Callback tooverride client certificate during SSL mutual authentication Declaration public event AsyncEventHandler<CertificateSelectionEventArgs> ClientCertificateSelectionCallback Event Type Type Description AsyncEventHandler < CertificateSelectionEventArgs > ClientConnectionCountChanged Occurs when client connection count changed. Declaration public event EventHandler ClientConnectionCountChanged Event Type Type Description EventHandler ServerCertificateValidationCallback Verifies the remote Secure Sockets Layer (SSL) certificate used for authentication Declaration public event AsyncEventHandler<CertificateValidationEventArgs> ServerCertificateValidationCallback Event Type Type Description AsyncEventHandler < CertificateValidationEventArgs > ServerConnectionCountChanged Occurs when server connection count changed. Declaration public event EventHandler ServerConnectionCountChanged Event Type Type Description EventHandler Implements System.IDisposable"
"keywords":"Class ProxyServer This object is the backbone of proxy. One can create as many instances as needed. However care should be taken to avoid using the same listening ports across multiple instances. Inheritance Object ProxyServer Implements IDisposable Inherited Members Object.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy Assembly : Titanium.Web.Proxy.dll Syntax public class ProxyServer : IDisposable Constructors ProxyServer(Boolean, Boolean, Boolean) Initializes a new instance of ProxyServer class with provided parameters. Declaration public ProxyServer(bool userTrustRootCertificate = true, bool machineTrustRootCertificate = false, bool trustRootCertificateAsAdmin = false) Parameters Type Name Description Boolean userTrustRootCertificate Should fake HTTPS certificate be trusted by this machine's user certificate store? Boolean machineTrustRootCertificate Should fake HTTPS certificate be trusted by this machine's certificate store? Boolean trustRootCertificateAsAdmin Should we attempt to trust certificates with elevated permissions by prompting for UAC if required? ProxyServer(String, String, Boolean, Boolean, Boolean) Initializes a new instance of ProxyServer class with provided parameters. Declaration public ProxyServer(string rootCertificateName, string rootCertificateIssuerName, bool userTrustRootCertificate = true, bool machineTrustRootCertificate = false, bool trustRootCertificateAsAdmin = false) Parameters Type Name Description String rootCertificateName Name of the root certificate. String rootCertificateIssuerName Name of the root certificate issuer. Boolean userTrustRootCertificate Should fake HTTPS certificate be trusted by this machine's user certificate store? Boolean machineTrustRootCertificate Should fake HTTPS certificate be trusted by this machine's certificate store? Boolean trustRootCertificateAsAdmin Should we attempt to trust certificates with elevated permissions by prompting for UAC if required? Properties AuthenticateUserFunc A callback to authenticate clients. Parameters are username and password as provided by client. Return true for successful authentication. Declaration public Func<string, string, Task<bool>> AuthenticateUserFunc { get; set; } Property Value Type Description Func < String , String , Task < Boolean >> BufferSize Buffer size used throughout this proxy. Declaration public int BufferSize { get; set; } Property Value Type Description Int32 CertificateManager Manages certificates used by this proxy. Declaration public CertificateManager CertificateManager { get; } Property Value Type Description CertificateManager CheckCertificateRevocation Should we check for certificare revocation during SSL authentication to servers Note: If enabled can reduce performance. Defaults to false. Declaration public X509RevocationMode CheckCertificateRevocation { get; set; } Property Value Type Description X509RevocationMode ClientConnectionCount Total number of active client connections. Declaration public int ClientConnectionCount { get; } Property Value Type Description Int32 ConnectionTimeOutSeconds Seconds client/server connection are to be kept alive when waiting for read/write to complete. Declaration public int ConnectionTimeOutSeconds { get; set; } Property Value Type Description Int32 Enable100ContinueBehaviour Does this proxy uses the HTTP protocol 100 continue behaviour strictly? Broken 100 contunue implementations on server/client may cause problems if enabled. Declaration public bool Enable100ContinueBehaviour { get; set; } Property Value Type Description Boolean EnableWinAuth 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. Declaration public bool EnableWinAuth { get; set; } Property Value Type Description Boolean ExceptionFunc Callback for error events in this proxy instance. Declaration public ExceptionHandler ExceptionFunc { get; set; } Property Value Type Description ExceptionHandler ForwardToUpstreamGateway Gets or sets a value indicating whether requests will be chained to upstream gateway. Declaration public bool ForwardToUpstreamGateway { get; set; } Property Value Type Description Boolean GetCustomUpStreamProxyFunc A callback to provide authentication credentials for up stream proxy this proxy is using for HTTP(S) requests. User should return the ExternalProxy object with valid credentials. Declaration public Func<SessionEventArgsBase, Task<ExternalProxy>> GetCustomUpStreamProxyFunc { get; set; } Property Value Type Description Func < SessionEventArgsBase , Task < ExternalProxy >> ProxyEndPoints A list of IpAddress and port this proxy is listening to. Declaration public List<ProxyEndPoint> ProxyEndPoints { get; set; } Property Value Type Description List < ProxyEndPoint > ProxyRealm Realm used during Proxy Basic Authentication. Declaration public string ProxyRealm { get; set; } Property Value Type Description String ProxyRunning Is the proxy currently running? Declaration public bool ProxyRunning { get; } Property Value Type Description Boolean ServerConnectionCount Total number of active server connections. Declaration public int ServerConnectionCount { get; } Property Value Type Description Int32 SupportedSslProtocols List of supported Ssl versions. Declaration public SslProtocols SupportedSslProtocols { get; set; } Property Value Type Description SslProtocols UpStreamEndPoint Local adapter/NIC endpoint where proxy makes request via. Defaults via any IP addresses of this machine. Declaration public IPEndPoint UpStreamEndPoint { get; set; } Property Value Type Description IPEndPoint UpStreamHttpProxy External proxy used for Http requests. Declaration public ExternalProxy UpStreamHttpProxy { get; set; } Property Value Type Description ExternalProxy UpStreamHttpsProxy External proxy used for Https requests. Declaration public ExternalProxy UpStreamHttpsProxy { get; set; } Property Value Type Description ExternalProxy Methods AddEndPoint(ProxyEndPoint) Add a proxy end point. Declaration public void AddEndPoint(ProxyEndPoint endPoint) Parameters Type Name Description ProxyEndPoint endPoint The proxy endpoint. DisableAllSystemProxies() Clear all proxy settings for current machine. Declaration public void DisableAllSystemProxies() DisableSystemHttpProxy() Clear HTTP proxy settings of current machine. Declaration public void DisableSystemHttpProxy() DisableSystemHttpsProxy() Clear HTTPS proxy settings of current machine. Declaration public void DisableSystemHttpsProxy() DisableSystemProxy(ProxyProtocolType) Clear the specified proxy setting for current machine. Declaration public void DisableSystemProxy(ProxyProtocolType protocolType) Parameters Type Name Description ProxyProtocolType protocolType Dispose() Dispose Proxy. Declaration public void Dispose() RemoveEndPoint(ProxyEndPoint) Remove a proxy end point. Will throw error if the end point does'nt exist Declaration public void RemoveEndPoint(ProxyEndPoint endPoint) Parameters Type Name Description ProxyEndPoint endPoint The existing endpoint to remove. SetAsSystemHttpProxy(ExplicitProxyEndPoint) Set the given explicit end point as the default proxy server for current machine. Declaration public void SetAsSystemHttpProxy(ExplicitProxyEndPoint endPoint) Parameters Type Name Description ExplicitProxyEndPoint endPoint SetAsSystemHttpsProxy(ExplicitProxyEndPoint) Set the given explicit end point as the default proxy server for current machine. Declaration public void SetAsSystemHttpsProxy(ExplicitProxyEndPoint endPoint) Parameters Type Name Description ExplicitProxyEndPoint endPoint SetAsSystemProxy(ExplicitProxyEndPoint, ProxyProtocolType) Set the given explicit end point as the default proxy server for current machine. Declaration public void SetAsSystemProxy(ExplicitProxyEndPoint endPoint, ProxyProtocolType protocolType) Parameters Type Name Description ExplicitProxyEndPoint endPoint ProxyProtocolType protocolType Start() Start this proxy server instance. Declaration public void Start() Stop() Stop this proxy server instance. Declaration public void Stop() Events AfterResponse Intercept after response from server. Declaration public event AsyncEventHandler<SessionEventArgs> AfterResponse Event Type Type Description AsyncEventHandler < SessionEventArgs > BeforeRequest Intercept request to server. Declaration public event AsyncEventHandler<SessionEventArgs> BeforeRequest Event Type Type Description AsyncEventHandler < SessionEventArgs > BeforeResponse Intercept response from server. Declaration public event AsyncEventHandler<SessionEventArgs> BeforeResponse Event Type Type Description AsyncEventHandler < SessionEventArgs > ClientCertificateSelectionCallback Callback to override client certificate selection during mutual SSL authentication. Declaration public event AsyncEventHandler<CertificateSelectionEventArgs> ClientCertificateSelectionCallback Event Type Type Description AsyncEventHandler < CertificateSelectionEventArgs > ClientConnectionCountChanged Occurs when client connection count changed. Declaration public event EventHandler ClientConnectionCountChanged Event Type Type Description EventHandler ServerCertificateValidationCallback Verifies the remote SSL certificate used for authentication. Declaration public event AsyncEventHandler<CertificateValidationEventArgs> ServerCertificateValidationCallback Event Type Type Description AsyncEventHandler < CertificateValidationEventArgs > ServerConnectionCountChanged Occurs when server connection count changed. Declaration public event EventHandler ServerConnectionCountChanged Event Type Type Description EventHandler Implements System.IDisposable"