Event to override the default verification logic of remote SSL certificate received during authentication.
Event occurs when server connection count changed.
diff --git a/docs/index.json b/docs/index.json
index 9c9dde4be..895f512f7 100644
--- a/docs/index.json
+++ b/docs/index.json
@@ -7,17 +7,17 @@
"api/Titanium.Web.Proxy.EventArguments.BeforeSslAuthenticateEventArgs.html": {
"href": "api/Titanium.Web.Proxy.EventArguments.BeforeSslAuthenticateEventArgs.html",
"title": "Class BeforeSslAuthenticateEventArgs | Titanium Web Proxy",
- "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 | Improve this Doc View Source 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 | Improve this Doc View Source SniHostName The server name indication hostname if available. Otherwise the generic certificate hostname of TransparentEndPoint. Declaration public string SniHostName { get; } Property Value Type Description String Methods | Improve this Doc View Source TerminateSession() Terminate the request abruptly by closing client/server connections. 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.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Object.ToString() Namespace : Titanium.Web.Proxy.EventArguments Assembly : Titanium.Web.Proxy.dll Syntax public class BeforeSslAuthenticateEventArgs : EventArgs Properties | Improve this Doc View Source 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 | Improve this Doc View Source SniHostName The server name indication hostname if available. Otherwise the generic certificate hostname of TransparentEndPoint. Declaration public string SniHostName { get; } Property Value Type Description String Methods | Improve this Doc View Source TerminateSession() Terminate the request abruptly by closing client/server connections. Declaration public void TerminateSession()"
},
"api/Titanium.Web.Proxy.EventArguments.CertificateSelectionEventArgs.html": {
"href": "api/Titanium.Web.Proxy.EventArguments.CertificateSelectionEventArgs.html",
"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 | Improve this Doc View Source AcceptableIssuers Acceptable issuers as listed by remote server. Declaration public string[] AcceptableIssuers { get; } Property Value Type Description String [] | Improve this Doc View Source ClientCertificate Client Certificate we selected. Set this value to override. Declaration public X509Certificate ClientCertificate { get; set; } Property Value Type Description X509Certificate | Improve this Doc View Source LocalCertificates Local certificates in store with matching issuers requested by TargetHost website. Declaration public X509CertificateCollection LocalCertificates { get; } Property Value Type Description X509CertificateCollection | Improve this Doc View Source RemoteCertificate Certificate of the remote server. Declaration public X509Certificate RemoteCertificate { get; } Property Value Type Description X509Certificate | Improve this Doc View Source Sender The proxy server instance. Declaration public object Sender { get; } Property Value Type Description Object | Improve this Doc View Source TargetHost The remote hostname to which we are authenticating against. 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.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Object.ToString() Namespace : Titanium.Web.Proxy.EventArguments Assembly : Titanium.Web.Proxy.dll Syntax public class CertificateSelectionEventArgs : EventArgs Properties | Improve this Doc View Source AcceptableIssuers Acceptable issuers as listed by remote server. Declaration public string[] AcceptableIssuers { get; } Property Value Type Description String [] | Improve this Doc View Source ClientCertificate Client Certificate we selected. Set this value to override. Declaration public X509Certificate ClientCertificate { get; set; } Property Value Type Description X509Certificate | Improve this Doc View Source LocalCertificates Local certificates in store with matching issuers requested by TargetHost website. Declaration public X509CertificateCollection LocalCertificates { get; } Property Value Type Description X509CertificateCollection | Improve this Doc View Source RemoteCertificate Certificate of the remote server. Declaration public X509Certificate RemoteCertificate { get; } Property Value Type Description X509Certificate | Improve this Doc View Source Sender The proxy server instance. Declaration public object Sender { get; } Property Value Type Description Object | Improve this Doc View Source TargetHost The remote hostname to which we are authenticating against. Declaration public string TargetHost { get; } Property Value Type Description String"
},
"api/Titanium.Web.Proxy.EventArguments.CertificateValidationEventArgs.html": {
"href": "api/Titanium.Web.Proxy.EventArguments.CertificateValidationEventArgs.html",
"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 | Improve this Doc View Source Certificate Server certificate. Declaration public X509Certificate Certificate { get; } Property Value Type Description X509Certificate | Improve this Doc View Source Chain Certificate chain. Declaration public X509Chain Chain { get; } Property Value Type Description X509Chain | Improve this Doc View Source IsValid Is the given server certificate valid? Declaration public bool IsValid { get; set; } Property Value Type Description Boolean | Improve this Doc View Source 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.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Object.ToString() Namespace : Titanium.Web.Proxy.EventArguments Assembly : Titanium.Web.Proxy.dll Syntax public class CertificateValidationEventArgs : EventArgs Properties | Improve this Doc View Source Certificate Server certificate. Declaration public X509Certificate Certificate { get; } Property Value Type Description X509Certificate | Improve this Doc View Source Chain Certificate chain. Declaration public X509Chain Chain { get; } Property Value Type Description X509Chain | Improve this Doc View Source IsValid Is the given server certificate valid? Declaration public bool IsValid { get; set; } Property Value Type Description Boolean | Improve this Doc View Source SslPolicyErrors SSL policy errors. Declaration public SslPolicyErrors SslPolicyErrors { get; } Property Value Type Description SslPolicyErrors"
},
"api/Titanium.Web.Proxy.EventArguments.html": {
"href": "api/Titanium.Web.Proxy.EventArguments.html",
@@ -27,22 +27,22 @@
"api/Titanium.Web.Proxy.EventArguments.MultipartRequestPartSentEventArgs.html": {
"href": "api/Titanium.Web.Proxy.EventArguments.MultipartRequestPartSentEventArgs.html",
"title": "Class MultipartRequestPartSentEventArgs | Titanium Web Proxy",
- "keywords": "Class MultipartRequestPartSentEventArgs Class that wraps the multipart sent request arguments. Inheritance Object EventArgs MultipartRequestPartSentEventArgs 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 MultipartRequestPartSentEventArgs : EventArgs Properties | Improve this Doc View Source Boundary Boundary. Declaration public string Boundary { get; } Property Value Type Description String | Improve this Doc View Source Headers The header collection. Declaration public HeaderCollection Headers { get; } Property Value Type Description HeaderCollection"
+ "keywords": "Class MultipartRequestPartSentEventArgs Class that wraps the multipart sent request arguments. Inheritance Object EventArgs MultipartRequestPartSentEventArgs Inherited Members EventArgs.Empty Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Object.ToString() Namespace : Titanium.Web.Proxy.EventArguments Assembly : Titanium.Web.Proxy.dll Syntax public class MultipartRequestPartSentEventArgs : EventArgs Properties | Improve this Doc View Source Boundary Boundary. Declaration public string Boundary { get; } Property Value Type Description String | Improve this Doc View Source Headers The header collection. Declaration public HeaderCollection Headers { get; } Property Value Type Description HeaderCollection"
},
"api/Titanium.Web.Proxy.EventArguments.SessionEventArgs.html": {
"href": "api/Titanium.Web.Proxy.EventArguments.SessionEventArgs.html",
"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.BufferPool SessionEventArgsBase.ExceptionFunc SessionEventArgsBase.TimeLine SessionEventArgsBase.UserData SessionEventArgsBase.IsHttps SessionEventArgsBase.ClientEndPoint SessionEventArgsBase.HttpClient 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 | Improve this Doc View Source SessionEventArgs(ProxyServer, ProxyEndPoint, Request, CancellationTokenSource) Declaration protected SessionEventArgs(ProxyServer server, ProxyEndPoint endPoint, Request request, CancellationTokenSource cancellationTokenSource) Parameters Type Name Description ProxyServer server ProxyEndPoint endPoint Request request CancellationTokenSource cancellationTokenSource Properties | Improve this Doc View Source IsPromise Is this session a HTTP/2 promise? Declaration public bool IsPromise { get; } Property Value Type Description Boolean | Improve this Doc View Source ReRequest Should we send the request again ? Declaration public bool ReRequest { get; set; } Property Value Type Description Boolean Methods | Improve this Doc View Source Dispose() Implement any cleanup here Declaration public override void Dispose() Overrides SessionEventArgsBase.Dispose() | Improve this Doc View Source GenericResponse(Byte[], HttpStatusCode, Dictionary
, Boolean) 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 headers, bool closeServerConnection = false) Parameters Type Name Description Byte [] result The bytes to sent. HttpStatusCode status The HTTP status code. Dictionary < String , HttpHeader > headers The HTTP headers. Boolean closeServerConnection Close the server connection used by request if any? | Improve this Doc View Source GenericResponse(String, HttpStatusCode, Dictionary, Boolean) 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 headers = null, bool closeServerConnection = false) Parameters Type Name Description String html The html content. HttpStatusCode status The HTTP status code. Dictionary < String , HttpHeader > headers The HTTP headers. Boolean closeServerConnection Close the server connection used by request if any? | Improve this Doc View Source GetRequestBody(CancellationToken) Gets the request body as bytes. Declaration public Task GetRequestBody(CancellationToken cancellationToken = default(CancellationToken)) Parameters Type Name Description CancellationToken cancellationToken Optional cancellation token for this async task. Returns Type Description Task < Byte []> The body as bytes. | Improve this Doc View Source GetRequestBodyAsString(CancellationToken) Gets the request body as string. Declaration public Task GetRequestBodyAsString(CancellationToken cancellationToken = default(CancellationToken)) Parameters Type Name Description CancellationToken cancellationToken Optional cancellation token for this async task. Returns Type Description Task < String > The body as string. | Improve this Doc View Source GetResponseBody(CancellationToken) Gets the response body as bytes. Declaration public Task GetResponseBody(CancellationToken cancellationToken = default(CancellationToken)) Parameters Type Name Description CancellationToken cancellationToken Optional cancellation token for this async task. Returns Type Description Task < Byte []> The resulting bytes. | Improve this Doc View Source GetResponseBodyAsString(CancellationToken) Gets the response body as string. Declaration public Task GetResponseBodyAsString(CancellationToken cancellationToken = default(CancellationToken)) Parameters Type Name Description CancellationToken cancellationToken Optional cancellation token for this async task. Returns Type Description Task < String > The string body. | Improve this Doc View Source Ok(Byte[], Dictionary, Boolean) Before request is made to server respond with the specified byte[] to client and ignore the request. Declaration public void Ok(byte[] result, Dictionary headers = null, bool closeServerConnection = false) Parameters Type Name Description Byte [] result The html content bytes. Dictionary < String , HttpHeader > headers The HTTP headers. Boolean closeServerConnection Close the server connection used by request if any? | Improve this Doc View Source Ok(String, Dictionary, Boolean) 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 headers = null, bool closeServerConnection = false) Parameters Type Name Description String html HTML content to sent. Dictionary < String , HttpHeader > headers HTTP response headers. Boolean closeServerConnection Close the server connection used by request if any? | Improve this Doc View Source Redirect(String, Boolean) Redirect to provided URL. Declaration public void Redirect(string url, bool closeServerConnection = false) Parameters Type Name Description String url The URL to redirect. Boolean closeServerConnection Close the server connection used by request if any? | Improve this Doc View Source Respond(Response, Boolean) Respond with given response object to client. Declaration public void Respond(Response response, bool closeServerConnection = false) Parameters Type Name Description Response response The response object. Boolean closeServerConnection Close the server connection used by request if any? | Improve this Doc View Source SetRequestBody(Byte[]) Sets the request body. Declaration public void SetRequestBody(byte[] body) Parameters Type Name Description Byte [] body The request body bytes. | Improve this Doc View Source 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. | Improve this Doc View Source SetResponseBody(Byte[]) Set the response body bytes. Declaration public void SetResponseBody(byte[] body) Parameters Type Name Description Byte [] body The body bytes to set. | Improve this Doc View Source SetResponseBodyString(String) Replace the response body with the specified string. Declaration public void SetResponseBodyString(string body) Parameters Type Name Description String body The body string to set. | Improve this Doc View Source TerminateServerConnection() Terminate the connection to server at the end of this HTTP request/response session. Declaration public void TerminateServerConnection() Events | Improve this Doc View Source MultipartRequestPartSent Occurs when multipart request part sent. Declaration public event EventHandler 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.BufferPool SessionEventArgsBase.ExceptionFunc SessionEventArgsBase.TimeLine SessionEventArgsBase.UserData SessionEventArgsBase.IsHttps SessionEventArgsBase.ClientEndPoint SessionEventArgsBase.HttpClient SessionEventArgsBase.WebSession SessionEventArgsBase.CustomUpStreamProxyUsed SessionEventArgsBase.LocalEndPoint SessionEventArgsBase.IsTransparent SessionEventArgsBase.Exception SessionEventArgsBase.DataSent SessionEventArgsBase.DataReceived SessionEventArgsBase.TerminateSession() EventArgs.Empty Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Object.ToString() Namespace : Titanium.Web.Proxy.EventArguments Assembly : Titanium.Web.Proxy.dll Syntax public class SessionEventArgs : SessionEventArgsBase, IDisposable Constructors | Improve this Doc View Source SessionEventArgs(ProxyServer, ProxyEndPoint, Request, CancellationTokenSource) Declaration protected SessionEventArgs(ProxyServer server, ProxyEndPoint endPoint, Request request, CancellationTokenSource cancellationTokenSource) Parameters Type Name Description ProxyServer server ProxyEndPoint endPoint Request request CancellationTokenSource cancellationTokenSource Properties | Improve this Doc View Source IsPromise Is this session a HTTP/2 promise? Declaration public bool IsPromise { get; } Property Value Type Description Boolean | Improve this Doc View Source ReRequest Should we send the request again ? Declaration public bool ReRequest { get; set; } Property Value Type Description Boolean Methods | Improve this Doc View Source Dispose() Implement any cleanup here Declaration public override void Dispose() Overrides SessionEventArgsBase.Dispose() | Improve this Doc View Source GenericResponse(Byte[], HttpStatusCode, Dictionary, Boolean) 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 headers, bool closeServerConnection = false) Parameters Type Name Description Byte [] result The bytes to sent. HttpStatusCode status The HTTP status code. Dictionary < String , HttpHeader > headers The HTTP headers. Boolean closeServerConnection Close the server connection used by request if any? | Improve this Doc View Source GenericResponse(String, HttpStatusCode, Dictionary, Boolean) 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 headers = null, bool closeServerConnection = false) Parameters Type Name Description String html The html content. HttpStatusCode status The HTTP status code. Dictionary < String , HttpHeader > headers The HTTP headers. Boolean closeServerConnection Close the server connection used by request if any? | Improve this Doc View Source GetRequestBody(CancellationToken) Gets the request body as bytes. Declaration public Task GetRequestBody(CancellationToken cancellationToken = default(CancellationToken)) Parameters Type Name Description CancellationToken cancellationToken Optional cancellation token for this async task. Returns Type Description Task < Byte []> The body as bytes. | Improve this Doc View Source GetRequestBodyAsString(CancellationToken) Gets the request body as string. Declaration public Task GetRequestBodyAsString(CancellationToken cancellationToken = default(CancellationToken)) Parameters Type Name Description CancellationToken cancellationToken Optional cancellation token for this async task. Returns Type Description Task < String > The body as string. | Improve this Doc View Source GetResponseBody(CancellationToken) Gets the response body as bytes. Declaration public Task GetResponseBody(CancellationToken cancellationToken = default(CancellationToken)) Parameters Type Name Description CancellationToken cancellationToken Optional cancellation token for this async task. Returns Type Description Task < Byte []> The resulting bytes. | Improve this Doc View Source GetResponseBodyAsString(CancellationToken) Gets the response body as string. Declaration public Task GetResponseBodyAsString(CancellationToken cancellationToken = default(CancellationToken)) Parameters Type Name Description CancellationToken cancellationToken Optional cancellation token for this async task. Returns Type Description Task < String > The string body. | Improve this Doc View Source Ok(Byte[], Dictionary, Boolean) Before request is made to server respond with the specified byte[] to client and ignore the request. Declaration public void Ok(byte[] result, Dictionary headers = null, bool closeServerConnection = false) Parameters Type Name Description Byte [] result The html content bytes. Dictionary < String , HttpHeader > headers The HTTP headers. Boolean closeServerConnection Close the server connection used by request if any? | Improve this Doc View Source Ok(String, Dictionary, Boolean) 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 headers = null, bool closeServerConnection = false) Parameters Type Name Description String html HTML content to sent. Dictionary < String , HttpHeader > headers HTTP response headers. Boolean closeServerConnection Close the server connection used by request if any? | Improve this Doc View Source Redirect(String, Boolean) Redirect to provided URL. Declaration public void Redirect(string url, bool closeServerConnection = false) Parameters Type Name Description String url The URL to redirect. Boolean closeServerConnection Close the server connection used by request if any? | Improve this Doc View Source Respond(Response, Boolean) Respond with given response object to client. Declaration public void Respond(Response response, bool closeServerConnection = false) Parameters Type Name Description Response response The response object. Boolean closeServerConnection Close the server connection used by request if any? | Improve this Doc View Source SetRequestBody(Byte[]) Sets the request body. Declaration public void SetRequestBody(byte[] body) Parameters Type Name Description Byte [] body The request body bytes. | Improve this Doc View Source 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. | Improve this Doc View Source SetResponseBody(Byte[]) Set the response body bytes. Declaration public void SetResponseBody(byte[] body) Parameters Type Name Description Byte [] body The body bytes to set. | Improve this Doc View Source SetResponseBodyString(String) Replace the response body with the specified string. Declaration public void SetResponseBodyString(string body) Parameters Type Name Description String body The body string to set. | Improve this Doc View Source TerminateServerConnection() Terminate the connection to server at the end of this HTTP request/response session. Declaration public void TerminateServerConnection() Events | Improve this Doc View Source MultipartRequestPartSent Occurs when multipart request part sent. Declaration public event EventHandler MultipartRequestPartSent Event Type Type Description EventHandler < MultipartRequestPartSentEventArgs > Implements System.IDisposable"
},
"api/Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.html": {
"href": "api/Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.html",
"title": "Class SessionEventArgsBase | Titanium Web Proxy",
- "keywords": "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 SessionEventArgsBase SessionEventArgs TunnelConnectSessionEventArgs Implements IDisposable 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 abstract class SessionEventArgsBase : EventArgs, IDisposable Constructors | Improve this Doc View Source SessionEventArgsBase(ProxyServer, ProxyEndPoint, CancellationTokenSource, Request) Declaration protected SessionEventArgsBase(ProxyServer server, ProxyEndPoint endPoint, CancellationTokenSource cancellationTokenSource, Request request) Parameters Type Name Description ProxyServer server ProxyEndPoint endPoint CancellationTokenSource cancellationTokenSource Request request Fields | Improve this Doc View Source BufferPool Declaration protected readonly IBufferPool BufferPool Field Value Type Description IBufferPool | Improve this Doc View Source BufferSize Declaration protected readonly int BufferSize Field Value Type Description Int32 | Improve this Doc View Source ExceptionFunc Declaration protected readonly ExceptionHandler ExceptionFunc Field Value Type Description ExceptionHandler Properties | Improve this Doc View Source ClientEndPoint Client End Point. Declaration public IPEndPoint ClientEndPoint { get; } Property Value Type Description IPEndPoint | Improve this Doc View Source CustomUpStreamProxyUsed Are we using a custom upstream HTTP(S) proxy? Declaration public ExternalProxy CustomUpStreamProxyUsed { get; } Property Value Type Description ExternalProxy | Improve this Doc View Source Exception The last exception that happened. Declaration public Exception Exception { get; } Property Value Type Description Exception | Improve this Doc View Source HttpClient The web client used to communicate with server for this session. Declaration public HttpWebClient HttpClient { get; } Property Value Type Description HttpWebClient | Improve this Doc View Source IsHttps Does this session uses SSL? Declaration public bool IsHttps { get; } Property Value Type Description Boolean | Improve this Doc View Source IsTransparent Is this a transparent endpoint? Declaration public bool IsTransparent { get; } Property Value Type Description Boolean | Improve this Doc View Source LocalEndPoint Local endpoint via which we make the request. Declaration public ProxyEndPoint LocalEndPoint { get; } Property Value Type Description ProxyEndPoint | Improve this Doc View Source TimeLine Relative milliseconds for various events. Declaration public Dictionary TimeLine { get; } Property Value Type Description Dictionary < String , DateTime > | Improve this Doc View Source UserData Returns a user data for this request/response session which is same as the user data of HttpClient. Declaration public object UserData { get; set; } Property Value Type Description Object | Improve this Doc View Source WebSession Declaration [Obsolete(\"Use HttpClient instead.\")] public HttpWebClient WebSession { get; } Property Value Type Description HttpWebClient Methods | Improve this Doc View Source Dispose() Implements cleanup here. Declaration public virtual void Dispose() | Improve this Doc View Source TerminateSession() Terminates the session abruptly by terminating client/server connections. Declaration public void TerminateSession() Events | Improve this Doc View Source DataReceived Fired when data is received within this session from client/server. Declaration public event EventHandler DataReceived Event Type Type Description EventHandler < DataEventArgs > | Improve this Doc View Source DataSent Fired when data is sent within this session to server/client. Declaration public event EventHandler DataSent Event Type Type Description EventHandler < DataEventArgs > Implements System.IDisposable"
+ "keywords": "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 SessionEventArgsBase SessionEventArgs TunnelConnectSessionEventArgs Implements IDisposable Inherited Members EventArgs.Empty Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Object.ToString() Namespace : Titanium.Web.Proxy.EventArguments Assembly : Titanium.Web.Proxy.dll Syntax public abstract class SessionEventArgsBase : EventArgs, IDisposable Constructors | Improve this Doc View Source SessionEventArgsBase(ProxyServer, ProxyEndPoint, CancellationTokenSource, Request) Declaration protected SessionEventArgsBase(ProxyServer server, ProxyEndPoint endPoint, CancellationTokenSource cancellationTokenSource, Request request) Parameters Type Name Description ProxyServer server ProxyEndPoint endPoint CancellationTokenSource cancellationTokenSource Request request Fields | Improve this Doc View Source BufferPool Declaration protected readonly IBufferPool BufferPool Field Value Type Description IBufferPool | Improve this Doc View Source BufferSize Declaration protected readonly int BufferSize Field Value Type Description Int32 | Improve this Doc View Source ExceptionFunc Declaration protected readonly ExceptionHandler ExceptionFunc Field Value Type Description ExceptionHandler Properties | Improve this Doc View Source ClientEndPoint Client End Point. Declaration public IPEndPoint ClientEndPoint { get; } Property Value Type Description IPEndPoint | Improve this Doc View Source CustomUpStreamProxyUsed Are we using a custom upstream HTTP(S) proxy? Declaration public ExternalProxy CustomUpStreamProxyUsed { get; } Property Value Type Description ExternalProxy | Improve this Doc View Source Exception The last exception that happened. Declaration public Exception Exception { get; } Property Value Type Description Exception | Improve this Doc View Source HttpClient The web client used to communicate with server for this session. Declaration public HttpWebClient HttpClient { get; } Property Value Type Description HttpWebClient | Improve this Doc View Source IsHttps Does this session uses SSL? Declaration public bool IsHttps { get; } Property Value Type Description Boolean | Improve this Doc View Source IsTransparent Is this a transparent endpoint? Declaration public bool IsTransparent { get; } Property Value Type Description Boolean | Improve this Doc View Source LocalEndPoint Local endpoint via which we make the request. Declaration public ProxyEndPoint LocalEndPoint { get; } Property Value Type Description ProxyEndPoint | Improve this Doc View Source TimeLine Relative milliseconds for various events. Declaration public Dictionary TimeLine { get; } Property Value Type Description Dictionary < String , DateTime > | Improve this Doc View Source UserData Returns a user data for this request/response session which is same as the user data of HttpClient. Declaration public object UserData { get; set; } Property Value Type Description Object | Improve this Doc View Source WebSession Declaration [Obsolete(\"Use HttpClient instead.\")] public HttpWebClient WebSession { get; } Property Value Type Description HttpWebClient Methods | Improve this Doc View Source Dispose() Implements cleanup here. Declaration public virtual void Dispose() | Improve this Doc View Source TerminateSession() Terminates the session abruptly by terminating client/server connections. Declaration public void TerminateSession() Events | Improve this Doc View Source DataReceived Fired when data is received within this session from client/server. Declaration public event EventHandler DataReceived Event Type Type Description EventHandler < DataEventArgs > | Improve this Doc View Source DataSent Fired when data is sent within this session to server/client. Declaration public event EventHandler DataSent Event Type Type Description EventHandler < DataEventArgs > Implements System.IDisposable"
},
"api/Titanium.Web.Proxy.EventArguments.TunnelConnectSessionEventArgs.html": {
"href": "api/Titanium.Web.Proxy.EventArguments.TunnelConnectSessionEventArgs.html",
"title": "Class TunnelConnectSessionEventArgs | Titanium Web Proxy",
- "keywords": "Class TunnelConnectSessionEventArgs A class that wraps the state when a tunnel connect event happen for Explicit endpoints. Inheritance Object EventArgs SessionEventArgsBase TunnelConnectSessionEventArgs Implements IDisposable Inherited Members SessionEventArgsBase.BufferSize SessionEventArgsBase.BufferPool SessionEventArgsBase.ExceptionFunc SessionEventArgsBase.TimeLine SessionEventArgsBase.UserData SessionEventArgsBase.IsHttps SessionEventArgsBase.ClientEndPoint SessionEventArgsBase.HttpClient SessionEventArgsBase.WebSession SessionEventArgsBase.CustomUpStreamProxyUsed SessionEventArgsBase.LocalEndPoint SessionEventArgsBase.IsTransparent SessionEventArgsBase.Exception SessionEventArgsBase.Dispose() 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 TunnelConnectSessionEventArgs : SessionEventArgsBase, IDisposable Properties | Improve this Doc View Source DecryptSsl Should we decrypt the Ssl or relay it to server? Default is true. Declaration public bool DecryptSsl { get; set; } Property Value Type Description Boolean | Improve this Doc View Source DenyConnect When set to true it denies the connect request with a Forbidden status. Declaration public bool DenyConnect { get; set; } Property Value Type Description Boolean | Improve this Doc View Source IsHttpsConnect Is this a connect request to secure HTTP server? Or is it to some other protocol. Declaration public bool IsHttpsConnect { get; } Property Value Type Description Boolean Implements System.IDisposable"
+ "keywords": "Class TunnelConnectSessionEventArgs A class that wraps the state when a tunnel connect event happen for Explicit endpoints. Inheritance Object EventArgs SessionEventArgsBase TunnelConnectSessionEventArgs Implements IDisposable Inherited Members SessionEventArgsBase.BufferSize SessionEventArgsBase.BufferPool SessionEventArgsBase.ExceptionFunc SessionEventArgsBase.TimeLine SessionEventArgsBase.UserData SessionEventArgsBase.IsHttps SessionEventArgsBase.ClientEndPoint SessionEventArgsBase.HttpClient SessionEventArgsBase.WebSession SessionEventArgsBase.CustomUpStreamProxyUsed SessionEventArgsBase.LocalEndPoint SessionEventArgsBase.IsTransparent SessionEventArgsBase.Exception SessionEventArgsBase.Dispose() SessionEventArgsBase.DataSent SessionEventArgsBase.DataReceived SessionEventArgsBase.TerminateSession() EventArgs.Empty Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Object.ToString() Namespace : Titanium.Web.Proxy.EventArguments Assembly : Titanium.Web.Proxy.dll Syntax public class TunnelConnectSessionEventArgs : SessionEventArgsBase, IDisposable Properties | Improve this Doc View Source DecryptSsl Should we decrypt the Ssl or relay it to server? Default is true. Declaration public bool DecryptSsl { get; set; } Property Value Type Description Boolean | Improve this Doc View Source DenyConnect When set to true it denies the connect request with a Forbidden status. Declaration public bool DenyConnect { get; set; } Property Value Type Description Boolean | Improve this Doc View Source IsHttpsConnect Is this a connect request to secure HTTP server? Or is it to some other protocol. Declaration public bool IsHttpsConnect { get; } Property Value Type Description Boolean Implements System.IDisposable"
},
"api/Titanium.Web.Proxy.ExceptionHandler.html": {
"href": "api/Titanium.Web.Proxy.ExceptionHandler.html",
@@ -52,7 +52,7 @@
"api/Titanium.Web.Proxy.Exceptions.BodyNotFoundException.html": {
"href": "api/Titanium.Web.Proxy.Exceptions.BodyNotFoundException.html",
"title": "Class BodyNotFoundException | Titanium Web Proxy",
- "keywords": "Class BodyNotFoundException An exception thrown when body is unexpectedly empty. Inheritance Object Exception ProxyException BodyNotFoundException Implements ISerializable _Exception Inherited Members Exception.GetBaseException() Exception.ToString() Exception.GetObjectData(SerializationInfo, StreamingContext) Exception.GetType() Exception.Message Exception.Data Exception.InnerException Exception.TargetSite Exception.StackTrace Exception.HelpLink Exception.Source Exception.HResult Exception.SerializeObjectState Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.Exceptions Assembly : Titanium.Web.Proxy.dll Syntax public class BodyNotFoundException : ProxyException, ISerializable, _Exception Implements System.Runtime.Serialization.ISerializable System.Runtime.InteropServices._Exception"
+ "keywords": "Class BodyNotFoundException An exception thrown when body is unexpectedly empty. Inheritance Object Exception ProxyException BodyNotFoundException Implements ISerializable Inherited Members Exception.GetBaseException() Exception.GetObjectData(SerializationInfo, StreamingContext) Exception.GetType() Exception.ToString() Exception.Data Exception.HelpLink Exception.HResult Exception.InnerException Exception.Message Exception.Source Exception.StackTrace Exception.TargetSite Exception.SerializeObjectState Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Namespace : Titanium.Web.Proxy.Exceptions Assembly : Titanium.Web.Proxy.dll Syntax public class BodyNotFoundException : ProxyException, ISerializable Implements System.Runtime.Serialization.ISerializable"
},
"api/Titanium.Web.Proxy.Exceptions.html": {
"href": "api/Titanium.Web.Proxy.Exceptions.html",
@@ -62,27 +62,27 @@
"api/Titanium.Web.Proxy.Exceptions.ProxyAuthorizationException.html": {
"href": "api/Titanium.Web.Proxy.Exceptions.ProxyAuthorizationException.html",
"title": "Class ProxyAuthorizationException | Titanium Web Proxy",
- "keywords": "Class ProxyAuthorizationException Proxy authorization exception. Inheritance Object Exception ProxyException ProxyAuthorizationException Implements ISerializable _Exception Inherited Members Exception.GetBaseException() Exception.ToString() Exception.GetObjectData(SerializationInfo, StreamingContext) Exception.GetType() Exception.Message Exception.Data Exception.InnerException Exception.TargetSite Exception.StackTrace Exception.HelpLink Exception.Source Exception.HResult Exception.SerializeObjectState Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.Exceptions Assembly : Titanium.Web.Proxy.dll Syntax public class ProxyAuthorizationException : ProxyException, ISerializable, _Exception Properties | Improve this Doc View Source Headers Headers associated with the authorization exception. Declaration public IEnumerable Headers { get; } Property Value Type Description IEnumerable < HttpHeader > | Improve this Doc View Source Session The current session within which this error happened. Declaration public SessionEventArgsBase Session { get; } Property Value Type Description SessionEventArgsBase Implements System.Runtime.Serialization.ISerializable System.Runtime.InteropServices._Exception"
+ "keywords": "Class ProxyAuthorizationException Proxy authorization exception. Inheritance Object Exception ProxyException ProxyAuthorizationException Implements ISerializable Inherited Members Exception.GetBaseException() Exception.GetObjectData(SerializationInfo, StreamingContext) Exception.GetType() Exception.ToString() Exception.Data Exception.HelpLink Exception.HResult Exception.InnerException Exception.Message Exception.Source Exception.StackTrace Exception.TargetSite Exception.SerializeObjectState Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Namespace : Titanium.Web.Proxy.Exceptions Assembly : Titanium.Web.Proxy.dll Syntax public class ProxyAuthorizationException : ProxyException, ISerializable Properties | Improve this Doc View Source Headers Headers associated with the authorization exception. Declaration public IEnumerable Headers { get; } Property Value Type Description IEnumerable < HttpHeader > | Improve this Doc View Source Session The current session within which this error happened. Declaration public SessionEventArgsBase Session { get; } Property Value Type Description SessionEventArgsBase Implements System.Runtime.Serialization.ISerializable"
},
"api/Titanium.Web.Proxy.Exceptions.ProxyConnectException.html": {
"href": "api/Titanium.Web.Proxy.Exceptions.ProxyConnectException.html",
"title": "Class ProxyConnectException | Titanium Web Proxy",
- "keywords": "Class ProxyConnectException Proxy Connection exception. Inheritance Object Exception ProxyException ProxyConnectException Implements ISerializable _Exception Inherited Members Exception.GetBaseException() Exception.ToString() Exception.GetObjectData(SerializationInfo, StreamingContext) Exception.GetType() Exception.Message Exception.Data Exception.InnerException Exception.TargetSite Exception.StackTrace Exception.HelpLink Exception.Source Exception.HResult Exception.SerializeObjectState Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.Exceptions Assembly : Titanium.Web.Proxy.dll Syntax public class ProxyConnectException : ProxyException, ISerializable, _Exception Properties | Improve this Doc View Source Session Gets session info associated to the exception. Declaration public SessionEventArgsBase Session { get; } Property Value Type Description SessionEventArgsBase Remarks This object properties should not be edited. Implements System.Runtime.Serialization.ISerializable System.Runtime.InteropServices._Exception"
+ "keywords": "Class ProxyConnectException Proxy Connection exception. Inheritance Object Exception ProxyException ProxyConnectException Implements ISerializable Inherited Members Exception.GetBaseException() Exception.GetObjectData(SerializationInfo, StreamingContext) Exception.GetType() Exception.ToString() Exception.Data Exception.HelpLink Exception.HResult Exception.InnerException Exception.Message Exception.Source Exception.StackTrace Exception.TargetSite Exception.SerializeObjectState Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Namespace : Titanium.Web.Proxy.Exceptions Assembly : Titanium.Web.Proxy.dll Syntax public class ProxyConnectException : ProxyException, ISerializable Properties | Improve this Doc View Source Session Gets session info associated to the exception. Declaration public SessionEventArgsBase Session { get; } Property Value Type Description SessionEventArgsBase Remarks This object properties should not be edited. Implements System.Runtime.Serialization.ISerializable"
},
"api/Titanium.Web.Proxy.Exceptions.ProxyException.html": {
"href": "api/Titanium.Web.Proxy.Exceptions.ProxyException.html",
"title": "Class ProxyException | Titanium Web Proxy",
- "keywords": "Class ProxyException Base class exception associated with this proxy server. Inheritance Object Exception ProxyException BodyNotFoundException ProxyAuthorizationException ProxyConnectException ProxyHttpException ServerConnectionException Implements ISerializable _Exception Inherited Members Exception.GetBaseException() Exception.ToString() Exception.GetObjectData(SerializationInfo, StreamingContext) Exception.GetType() Exception.Message Exception.Data Exception.InnerException Exception.TargetSite Exception.StackTrace Exception.HelpLink Exception.Source Exception.HResult Exception.SerializeObjectState Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.Exceptions Assembly : Titanium.Web.Proxy.dll Syntax public abstract class ProxyException : Exception, ISerializable, _Exception Constructors | Improve this Doc View Source ProxyException(String) Initializes a new instance of the ProxyException class. must be invoked by derived classes' constructors Declaration protected ProxyException(string message) Parameters Type Name Description String message Exception message | Improve this Doc View Source ProxyException(String, Exception) Initializes a new instance of the ProxyException class. must be invoked by derived classes' constructors Declaration protected ProxyException(string message, Exception innerException) Parameters Type Name Description String message Exception message Exception innerException Inner exception associated Implements System.Runtime.Serialization.ISerializable System.Runtime.InteropServices._Exception"
+ "keywords": "Class ProxyException Base class exception associated with this proxy server. Inheritance Object Exception ProxyException BodyNotFoundException ProxyAuthorizationException ProxyConnectException ProxyHttpException ServerConnectionException Implements ISerializable Inherited Members Exception.GetBaseException() Exception.GetObjectData(SerializationInfo, StreamingContext) Exception.GetType() Exception.ToString() Exception.Data Exception.HelpLink Exception.HResult Exception.InnerException Exception.Message Exception.Source Exception.StackTrace Exception.TargetSite Exception.SerializeObjectState Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Namespace : Titanium.Web.Proxy.Exceptions Assembly : Titanium.Web.Proxy.dll Syntax public abstract class ProxyException : Exception, ISerializable Constructors | Improve this Doc View Source ProxyException(String) Initializes a new instance of the ProxyException class. must be invoked by derived classes' constructors Declaration protected ProxyException(string message) Parameters Type Name Description String message Exception message | Improve this Doc View Source ProxyException(String, Exception) Initializes a new instance of the ProxyException class. must be invoked by derived classes' constructors Declaration protected ProxyException(string message, Exception innerException) Parameters Type Name Description String message Exception message Exception innerException Inner exception associated Implements System.Runtime.Serialization.ISerializable"
},
"api/Titanium.Web.Proxy.Exceptions.ProxyHttpException.html": {
"href": "api/Titanium.Web.Proxy.Exceptions.ProxyHttpException.html",
"title": "Class ProxyHttpException | Titanium Web Proxy",
- "keywords": "Class ProxyHttpException Proxy HTTP exception. Inheritance Object Exception ProxyException ProxyHttpException Implements ISerializable _Exception Inherited Members Exception.GetBaseException() Exception.ToString() Exception.GetObjectData(SerializationInfo, StreamingContext) Exception.GetType() Exception.Message Exception.Data Exception.InnerException Exception.TargetSite Exception.StackTrace Exception.HelpLink Exception.Source Exception.HResult Exception.SerializeObjectState Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.Exceptions Assembly : Titanium.Web.Proxy.dll Syntax public class ProxyHttpException : ProxyException, ISerializable, _Exception Properties | Improve this Doc View Source Session Gets session info associated to the exception. Declaration public SessionEventArgs Session { get; } Property Value Type Description SessionEventArgs Remarks This object properties should not be edited. Implements System.Runtime.Serialization.ISerializable System.Runtime.InteropServices._Exception"
+ "keywords": "Class ProxyHttpException Proxy HTTP exception. Inheritance Object Exception ProxyException ProxyHttpException Implements ISerializable Inherited Members Exception.GetBaseException() Exception.GetObjectData(SerializationInfo, StreamingContext) Exception.GetType() Exception.ToString() Exception.Data Exception.HelpLink Exception.HResult Exception.InnerException Exception.Message Exception.Source Exception.StackTrace Exception.TargetSite Exception.SerializeObjectState Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Namespace : Titanium.Web.Proxy.Exceptions Assembly : Titanium.Web.Proxy.dll Syntax public class ProxyHttpException : ProxyException, ISerializable Properties | Improve this Doc View Source Session Gets session info associated to the exception. Declaration public SessionEventArgs Session { get; } Property Value Type Description SessionEventArgs Remarks This object properties should not be edited. Implements System.Runtime.Serialization.ISerializable"
},
"api/Titanium.Web.Proxy.Exceptions.ServerConnectionException.html": {
"href": "api/Titanium.Web.Proxy.Exceptions.ServerConnectionException.html",
"title": "Class ServerConnectionException | Titanium Web Proxy",
- "keywords": "Class ServerConnectionException The server connection was closed upon first read with the new connection from pool. Should retry the request with a new connection. Inheritance Object Exception ProxyException ServerConnectionException Implements ISerializable _Exception Inherited Members Exception.GetBaseException() Exception.ToString() Exception.GetObjectData(SerializationInfo, StreamingContext) Exception.GetType() Exception.Message Exception.Data Exception.InnerException Exception.TargetSite Exception.StackTrace Exception.HelpLink Exception.Source Exception.HResult Exception.SerializeObjectState Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.Exceptions Assembly : Titanium.Web.Proxy.dll Syntax public class ServerConnectionException : ProxyException, ISerializable, _Exception Implements System.Runtime.Serialization.ISerializable System.Runtime.InteropServices._Exception"
+ "keywords": "Class ServerConnectionException The server connection was closed upon first read with the new connection from pool. Should retry the request with a new connection. Inheritance Object Exception ProxyException ServerConnectionException Implements ISerializable Inherited Members Exception.GetBaseException() Exception.GetObjectData(SerializationInfo, StreamingContext) Exception.GetType() Exception.ToString() Exception.Data Exception.HelpLink Exception.HResult Exception.InnerException Exception.Message Exception.Source Exception.StackTrace Exception.TargetSite Exception.SerializeObjectState Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Namespace : Titanium.Web.Proxy.Exceptions Assembly : Titanium.Web.Proxy.dll Syntax public class ServerConnectionException : ProxyException, ISerializable Implements System.Runtime.Serialization.ISerializable"
},
"api/Titanium.Web.Proxy.Helpers.html": {
"href": "api/Titanium.Web.Proxy.Helpers.html",
@@ -92,7 +92,7 @@
"api/Titanium.Web.Proxy.Helpers.RunTime.html": {
"href": "api/Titanium.Web.Proxy.Helpers.RunTime.html",
"title": "Class RunTime | Titanium Web Proxy",
- "keywords": "Class RunTime Run time helpers Inheritance Object RunTime 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.Helpers Assembly : Titanium.Web.Proxy.dll Syntax public static class RunTime Properties | Improve this Doc View Source IsLinux Declaration public static bool IsLinux { get; } Property Value Type Description Boolean | Improve this Doc View Source IsMac Declaration public static bool IsMac { get; } Property Value Type Description Boolean | Improve this Doc View Source IsUwpOnWindows Declaration public static bool IsUwpOnWindows { get; } Property Value Type Description Boolean | Improve this Doc View Source IsWindows Declaration public static bool IsWindows { get; } Property Value Type Description Boolean"
+ "keywords": "Class RunTime Run time helpers Inheritance Object RunTime Inherited Members Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Object.ToString() Namespace : Titanium.Web.Proxy.Helpers Assembly : Titanium.Web.Proxy.dll Syntax public static class RunTime Properties | Improve this Doc View Source IsLinux Declaration public static bool IsLinux { get; } Property Value Type Description Boolean | Improve this Doc View Source IsMac Declaration public static bool IsMac { get; } Property Value Type Description Boolean | Improve this Doc View Source IsUwpOnWindows Declaration public static bool IsUwpOnWindows { get; } Property Value Type Description Boolean | Improve this Doc View Source IsWindows Declaration public static bool IsWindows { get; } Property Value Type Description Boolean"
},
"api/Titanium.Web.Proxy.html": {
"href": "api/Titanium.Web.Proxy.html",
@@ -102,17 +102,17 @@
"api/Titanium.Web.Proxy.Http.ConnectRequest.html": {
"href": "api/Titanium.Web.Proxy.Http.ConnectRequest.html",
"title": "Class ConnectRequest | Titanium Web Proxy",
- "keywords": "Class ConnectRequest The tcp tunnel Connect request. Inheritance Object RequestResponseBase Request ConnectRequest Inherited Members Request.Method Request.RequestUri Request.IsHttps Request.OriginalUrl Request.RequestUriString Request.HasBody Request.Host Request.ExpectContinue Request.IsMultipartFormData Request.Url Request.UpgradeToWebSocket Request.ExpectationSucceeded Request.ExpectationFailed Request.HeaderText RequestResponseBase.BodyInternal RequestResponseBase.KeepBody RequestResponseBase.HttpVersion RequestResponseBase.Headers RequestResponseBase.ContentLength RequestResponseBase.ContentEncoding RequestResponseBase.Encoding RequestResponseBase.ContentType RequestResponseBase.IsChunked RequestResponseBase.Body RequestResponseBase.BodyString RequestResponseBase.IsBodyRead RequestResponseBase.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.Http Assembly : Titanium.Web.Proxy.dll Syntax public class ConnectRequest : Request Constructors | Improve this Doc View Source ConnectRequest() Declaration public ConnectRequest() Properties | Improve this Doc View Source ClientHelloInfo Declaration public ClientHelloInfo ClientHelloInfo { get; set; } Property Value Type Description ClientHelloInfo | Improve this Doc View Source TunnelType Declaration public TunnelType TunnelType { get; } Property Value Type Description TunnelType"
+ "keywords": "Class ConnectRequest The tcp tunnel Connect request. Inheritance Object RequestResponseBase Request ConnectRequest Inherited Members Request.Method Request.RequestUri Request.IsHttps Request.OriginalUrl Request.RequestUriString Request.HasBody Request.Host Request.ExpectContinue Request.IsMultipartFormData Request.Url Request.UpgradeToWebSocket Request.ExpectationSucceeded Request.ExpectationFailed Request.HeaderText RequestResponseBase.BodyInternal RequestResponseBase.KeepBody RequestResponseBase.HttpVersion RequestResponseBase.Headers RequestResponseBase.ContentLength RequestResponseBase.ContentEncoding RequestResponseBase.Encoding RequestResponseBase.ContentType RequestResponseBase.IsChunked RequestResponseBase.Body RequestResponseBase.BodyString RequestResponseBase.IsBodyRead RequestResponseBase.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Namespace : Titanium.Web.Proxy.Http Assembly : Titanium.Web.Proxy.dll Syntax public class ConnectRequest : Request Constructors | Improve this Doc View Source ConnectRequest() Declaration public ConnectRequest() Properties | Improve this Doc View Source ClientHelloInfo Declaration public ClientHelloInfo ClientHelloInfo { get; set; } Property Value Type Description ClientHelloInfo | Improve this Doc View Source TunnelType Declaration public TunnelType TunnelType { get; } Property Value Type Description TunnelType"
},
"api/Titanium.Web.Proxy.Http.ConnectResponse.html": {
"href": "api/Titanium.Web.Proxy.Http.ConnectResponse.html",
"title": "Class ConnectResponse | Titanium Web Proxy",
- "keywords": "Class ConnectResponse The tcp tunnel connect response object. Inheritance Object RequestResponseBase Response ConnectResponse Inherited Members Response.StatusCode Response.StatusDescription Response.HasBody Response.KeepAlive Response.HeaderText RequestResponseBase.BodyInternal RequestResponseBase.KeepBody RequestResponseBase.HttpVersion RequestResponseBase.Headers RequestResponseBase.ContentLength RequestResponseBase.ContentEncoding RequestResponseBase.Encoding RequestResponseBase.ContentType RequestResponseBase.IsChunked RequestResponseBase.Body RequestResponseBase.BodyString RequestResponseBase.IsBodyRead RequestResponseBase.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.Http Assembly : Titanium.Web.Proxy.dll Syntax public class ConnectResponse : Response Properties | Improve this Doc View Source ServerHelloInfo Declaration public ServerHelloInfo ServerHelloInfo { get; set; } Property Value Type Description ServerHelloInfo"
+ "keywords": "Class ConnectResponse The tcp tunnel connect response object. Inheritance Object RequestResponseBase Response ConnectResponse Inherited Members Response.StatusCode Response.StatusDescription Response.HasBody Response.KeepAlive Response.HeaderText RequestResponseBase.BodyInternal RequestResponseBase.KeepBody RequestResponseBase.HttpVersion RequestResponseBase.Headers RequestResponseBase.ContentLength RequestResponseBase.ContentEncoding RequestResponseBase.Encoding RequestResponseBase.ContentType RequestResponseBase.IsChunked RequestResponseBase.Body RequestResponseBase.BodyString RequestResponseBase.IsBodyRead RequestResponseBase.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Namespace : Titanium.Web.Proxy.Http Assembly : Titanium.Web.Proxy.dll Syntax public class ConnectResponse : Response Properties | Improve this Doc View Source ServerHelloInfo Declaration public ServerHelloInfo ServerHelloInfo { get; set; } Property Value Type Description ServerHelloInfo"
},
"api/Titanium.Web.Proxy.Http.HeaderCollection.html": {
"href": "api/Titanium.Web.Proxy.Http.HeaderCollection.html",
"title": "Class HeaderCollection | Titanium Web Proxy",
- "keywords": "Class HeaderCollection The http header collection. Inheritance Object HeaderCollection Implements IEnumerable < HttpHeader > IEnumerable 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.Http Assembly : Titanium.Web.Proxy.dll Syntax [TypeConverter(typeof(ExpandableObjectConverter))] public class HeaderCollection : IEnumerable, IEnumerable Constructors | Improve this Doc View Source HeaderCollection() Initializes a new instance of the HeaderCollection class. Declaration public HeaderCollection() Properties | Improve this Doc View Source Headers Unique Request header collection. Declaration public ReadOnlyDictionary Headers { get; } Property Value Type Description ReadOnlyDictionary < String , HttpHeader > | Improve this Doc View Source NonUniqueHeaders Non Unique headers. Declaration public ReadOnlyDictionary> NonUniqueHeaders { get; } Property Value Type Description ReadOnlyDictionary < String , List < HttpHeader >> Methods | Improve this Doc View Source AddHeader(String, String) Add a new header with given name and value Declaration public void AddHeader(string name, string value) Parameters Type Name Description String name String value | Improve this Doc View Source AddHeader(HttpHeader) Adds the given header object to Request Declaration public void AddHeader(HttpHeader newHeader) Parameters Type Name Description HttpHeader newHeader | Improve this Doc View Source AddHeaders(IEnumerable>) Adds the given header objects to Request Declaration public void AddHeaders(IEnumerable> newHeaders) Parameters Type Name Description IEnumerable < KeyValuePair < String , String >> newHeaders | Improve this Doc View Source AddHeaders(IEnumerable>) Adds the given header objects to Request Declaration public void AddHeaders(IEnumerable> newHeaders) Parameters Type Name Description IEnumerable < KeyValuePair < String , HttpHeader >> newHeaders | Improve this Doc View Source AddHeaders(IEnumerable) Adds the given header objects to Request Declaration public void AddHeaders(IEnumerable newHeaders) Parameters Type Name Description IEnumerable < HttpHeader > newHeaders | Improve this Doc View Source Clear() Removes all the headers. Declaration public void Clear() | Improve this Doc View Source GetAllHeaders() Returns all headers Declaration public List GetAllHeaders() Returns Type Description List < HttpHeader > | Improve this Doc View Source GetEnumerator() Returns an enumerator that iterates through the collection. Declaration public IEnumerator GetEnumerator() Returns Type Description IEnumerator < HttpHeader > An enumerator that can be used to iterate through the collection. | Improve this Doc View Source GetFirstHeader(String) Declaration public HttpHeader GetFirstHeader(string name) Parameters Type Name Description String name Returns Type Description HttpHeader | Improve this Doc View Source GetHeaders(String) Returns all headers with given name if exists Returns null if doesn't exist Declaration public List GetHeaders(string name) Parameters Type Name Description String name Returns Type Description List < HttpHeader > | Improve this Doc View Source HeaderExists(String) True if header exists Declaration public bool HeaderExists(string name) Parameters Type Name Description String name Returns Type Description Boolean | Improve this Doc View Source RemoveHeader(String) removes all headers with given name Declaration public bool RemoveHeader(string headerName) Parameters Type Name Description String headerName Returns Type Description Boolean True if header was removed False if no header exists with given name | Improve this Doc View Source RemoveHeader(HttpHeader) Removes given header object if it exist Declaration public bool RemoveHeader(HttpHeader header) Parameters Type Name Description HttpHeader header Returns true if header exists and was removed Returns Type Description Boolean Explicit Interface Implementations | Improve this Doc View Source IEnumerable.GetEnumerator() Declaration IEnumerator IEnumerable.GetEnumerator() Returns Type Description IEnumerator Implements System.Collections.Generic.IEnumerable System.Collections.IEnumerable"
+ "keywords": "Class HeaderCollection The http header collection. Inheritance Object HeaderCollection Implements IEnumerable < HttpHeader > IEnumerable Inherited Members Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Object.ToString() Namespace : Titanium.Web.Proxy.Http Assembly : Titanium.Web.Proxy.dll Syntax [TypeConverter(typeof(ExpandableObjectConverter))] public class HeaderCollection : IEnumerable, IEnumerable Constructors | Improve this Doc View Source HeaderCollection() Initializes a new instance of the HeaderCollection class. Declaration public HeaderCollection() Properties | Improve this Doc View Source Headers Unique Request header collection. Declaration public ReadOnlyDictionary Headers { get; } Property Value Type Description ReadOnlyDictionary < String , HttpHeader > | Improve this Doc View Source NonUniqueHeaders Non Unique headers. Declaration public ReadOnlyDictionary> NonUniqueHeaders { get; } Property Value Type Description ReadOnlyDictionary < String , List < HttpHeader >> Methods | Improve this Doc View Source AddHeader(String, String) Add a new header with given name and value Declaration public void AddHeader(string name, string value) Parameters Type Name Description String name String value | Improve this Doc View Source AddHeader(HttpHeader) Adds the given header object to Request Declaration public void AddHeader(HttpHeader newHeader) Parameters Type Name Description HttpHeader newHeader | Improve this Doc View Source AddHeaders(IEnumerable>) Adds the given header objects to Request Declaration public void AddHeaders(IEnumerable> newHeaders) Parameters Type Name Description IEnumerable < KeyValuePair < String , String >> newHeaders | Improve this Doc View Source AddHeaders(IEnumerable>) Adds the given header objects to Request Declaration public void AddHeaders(IEnumerable> newHeaders) Parameters Type Name Description IEnumerable < KeyValuePair < String , HttpHeader >> newHeaders | Improve this Doc View Source AddHeaders(IEnumerable) Adds the given header objects to Request Declaration public void AddHeaders(IEnumerable newHeaders) Parameters Type Name Description IEnumerable < HttpHeader > newHeaders | Improve this Doc View Source Clear() Removes all the headers. Declaration public void Clear() | Improve this Doc View Source GetAllHeaders() Returns all headers Declaration public List GetAllHeaders() Returns Type Description List < HttpHeader > | Improve this Doc View Source GetEnumerator() Returns an enumerator that iterates through the collection. Declaration public IEnumerator GetEnumerator() Returns Type Description IEnumerator < HttpHeader > An enumerator that can be used to iterate through the collection. | Improve this Doc View Source GetFirstHeader(String) Declaration public HttpHeader GetFirstHeader(string name) Parameters Type Name Description String name Returns Type Description HttpHeader | Improve this Doc View Source GetHeaders(String) Returns all headers with given name if exists Returns null if doesn't exist Declaration public List GetHeaders(string name) Parameters Type Name Description String name Returns Type Description List < HttpHeader > | Improve this Doc View Source HeaderExists(String) True if header exists Declaration public bool HeaderExists(string name) Parameters Type Name Description String name Returns Type Description Boolean | Improve this Doc View Source RemoveHeader(String) removes all headers with given name Declaration public bool RemoveHeader(string headerName) Parameters Type Name Description String headerName Returns Type Description Boolean True if header was removed False if no header exists with given name | Improve this Doc View Source RemoveHeader(HttpHeader) Removes given header object if it exist Declaration public bool RemoveHeader(HttpHeader header) Parameters Type Name Description HttpHeader header Returns true if header exists and was removed Returns Type Description Boolean Explicit Interface Implementations | Improve this Doc View Source IEnumerable.GetEnumerator() Declaration IEnumerator IEnumerable.GetEnumerator() Returns Type Description IEnumerator Implements System.Collections.Generic.IEnumerable System.Collections.IEnumerable"
},
"api/Titanium.Web.Proxy.Http.html": {
"href": "api/Titanium.Web.Proxy.Http.html",
@@ -122,32 +122,32 @@
"api/Titanium.Web.Proxy.Http.HttpWebClient.html": {
"href": "api/Titanium.Web.Proxy.Http.HttpWebClient.html",
"title": "Class HttpWebClient | Titanium Web Proxy",
- "keywords": "Class HttpWebClient Used to communicate with the server over HTTP(S) Inheritance Object HttpWebClient 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.Http Assembly : Titanium.Web.Proxy.dll Syntax public class HttpWebClient Properties | Improve this Doc View Source ConnectRequest Headers passed with Connect. Declaration public ConnectRequest ConnectRequest { get; } Property Value Type Description ConnectRequest | Improve this Doc View Source IsHttps Is Https? Declaration public bool IsHttps { get; } Property Value Type Description Boolean | Improve this Doc View Source ProcessId PID of the process that is created the current session when client is running in this machine If client is remote then this will return Declaration public Lazy ProcessId { get; } Property Value Type Description Lazy < Int32 > | Improve this Doc View Source Request Web Request. Declaration public Request Request { get; } Property Value Type Description Request | Improve this Doc View Source Response Web Response. Declaration public Response Response { get; } Property Value Type Description Response | Improve this Doc View Source UpStreamEndPoint Override UpStreamEndPoint for this request; Local NIC via request is made Declaration public IPEndPoint UpStreamEndPoint { get; set; } Property Value Type Description IPEndPoint | Improve this Doc View Source UserData Gets or sets the user data. Declaration public object UserData { get; set; } Property Value Type Description Object"
+ "keywords": "Class HttpWebClient Used to communicate with the server over HTTP(S) Inheritance Object HttpWebClient Inherited Members Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Object.ToString() Namespace : Titanium.Web.Proxy.Http Assembly : Titanium.Web.Proxy.dll Syntax public class HttpWebClient Properties | Improve this Doc View Source ConnectRequest Headers passed with Connect. Declaration public ConnectRequest ConnectRequest { get; } Property Value Type Description ConnectRequest | Improve this Doc View Source IsHttps Is Https? Declaration public bool IsHttps { get; } Property Value Type Description Boolean | Improve this Doc View Source ProcessId PID of the process that is created the current session when client is running in this machine If client is remote then this will return Declaration public Lazy ProcessId { get; } Property Value Type Description Lazy < Int32 > | Improve this Doc View Source Request Web Request. Declaration public Request Request { get; } Property Value Type Description Request | Improve this Doc View Source Response Web Response. Declaration public Response Response { get; } Property Value Type Description Response | Improve this Doc View Source UpStreamEndPoint Override UpStreamEndPoint for this request; Local NIC via request is made Declaration public IPEndPoint UpStreamEndPoint { get; set; } Property Value Type Description IPEndPoint | Improve this Doc View Source UserData Gets or sets the user data. Declaration public object UserData { get; set; } Property Value Type Description Object"
},
"api/Titanium.Web.Proxy.Http.KnownHeaders.html": {
"href": "api/Titanium.Web.Proxy.Http.KnownHeaders.html",
"title": "Class KnownHeaders | Titanium Web Proxy",
- "keywords": "Class KnownHeaders Well known http headers. Inheritance Object KnownHeaders 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.Http Assembly : Titanium.Web.Proxy.dll Syntax public static class KnownHeaders Fields | Improve this Doc View Source AcceptEncoding Declaration public const string AcceptEncoding = \"Accept-Encoding\" Field Value Type Description String | Improve this Doc View Source Authorization Declaration public const string Authorization = \"Authorization\" Field Value Type Description String | Improve this Doc View Source Connection Declaration public const string Connection = \"Connection\" Field Value Type Description String | Improve this Doc View Source ConnectionClose Declaration public const string ConnectionClose = \"close\" Field Value Type Description String | Improve this Doc View Source ConnectionKeepAlive Declaration public const string ConnectionKeepAlive = \"keep-alive\" Field Value Type Description String | Improve this Doc View Source ContentEncoding Declaration public const string ContentEncoding = \"Content-Encoding\" Field Value Type Description String | Improve this Doc View Source ContentEncodingBrotli Declaration public const string ContentEncodingBrotli = \"br\" Field Value Type Description String | Improve this Doc View Source ContentEncodingDeflate Declaration public const string ContentEncodingDeflate = \"deflate\" Field Value Type Description String | Improve this Doc View Source ContentEncodingGzip Declaration public const string ContentEncodingGzip = \"gzip\" Field Value Type Description String | Improve this Doc View Source ContentLength Declaration public const string ContentLength = \"Content-Length\" Field Value Type Description String | Improve this Doc View Source ContentType Declaration public const string ContentType = \"Content-Type\" Field Value Type Description String | Improve this Doc View Source ContentTypeBoundary Declaration public const string ContentTypeBoundary = \"boundary\" Field Value Type Description String | Improve this Doc View Source ContentTypeCharset Declaration public const string ContentTypeCharset = \"charset\" Field Value Type Description String | Improve this Doc View Source Expect Declaration public const string Expect = \"Expect\" Field Value Type Description String | Improve this Doc View Source Expect100Continue Declaration public const string Expect100Continue = \"100-continue\" Field Value Type Description String | Improve this Doc View Source Host Declaration public const string Host = \"Host\" Field Value Type Description String | Improve this Doc View Source Location Declaration public const string Location = \"Location\" Field Value Type Description String | Improve this Doc View Source ProxyAuthenticate Declaration public const string ProxyAuthenticate = \"Proxy-Authenticate\" Field Value Type Description String | Improve this Doc View Source ProxyAuthorization Declaration public const string ProxyAuthorization = \"Proxy-Authorization\" Field Value Type Description String | Improve this Doc View Source ProxyAuthorizationBasic Declaration public const string ProxyAuthorizationBasic = \"basic\" Field Value Type Description String | Improve this Doc View Source ProxyConnection Declaration public const string ProxyConnection = \"Proxy-Connection\" Field Value Type Description String | Improve this Doc View Source ProxyConnectionClose Declaration public const string ProxyConnectionClose = \"close\" Field Value Type Description String | Improve this Doc View Source TransferEncoding Declaration public const string TransferEncoding = \"Transfer-Encoding\" Field Value Type Description String | Improve this Doc View Source TransferEncodingChunked Declaration public const string TransferEncodingChunked = \"chunked\" Field Value Type Description String | Improve this Doc View Source Upgrade Declaration public const string Upgrade = \"Upgrade\" Field Value Type Description String | Improve this Doc View Source UpgradeWebsocket Declaration public const string UpgradeWebsocket = \"websocket\" Field Value Type Description String"
+ "keywords": "Class KnownHeaders Well known http headers. Inheritance Object KnownHeaders Inherited Members Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Object.ToString() Namespace : Titanium.Web.Proxy.Http Assembly : Titanium.Web.Proxy.dll Syntax public static class KnownHeaders Fields | Improve this Doc View Source AcceptEncoding Declaration public const string AcceptEncoding = \"Accept-Encoding\" Field Value Type Description String | Improve this Doc View Source Authorization Declaration public const string Authorization = \"Authorization\" Field Value Type Description String | Improve this Doc View Source Connection Declaration public const string Connection = \"Connection\" Field Value Type Description String | Improve this Doc View Source ConnectionClose Declaration public const string ConnectionClose = \"close\" Field Value Type Description String | Improve this Doc View Source ConnectionKeepAlive Declaration public const string ConnectionKeepAlive = \"keep-alive\" Field Value Type Description String | Improve this Doc View Source ContentEncoding Declaration public const string ContentEncoding = \"Content-Encoding\" Field Value Type Description String | Improve this Doc View Source ContentEncodingBrotli Declaration public const string ContentEncodingBrotli = \"br\" Field Value Type Description String | Improve this Doc View Source ContentEncodingDeflate Declaration public const string ContentEncodingDeflate = \"deflate\" Field Value Type Description String | Improve this Doc View Source ContentEncodingGzip Declaration public const string ContentEncodingGzip = \"gzip\" Field Value Type Description String | Improve this Doc View Source ContentLength Declaration public const string ContentLength = \"Content-Length\" Field Value Type Description String | Improve this Doc View Source ContentType Declaration public const string ContentType = \"Content-Type\" Field Value Type Description String | Improve this Doc View Source ContentTypeBoundary Declaration public const string ContentTypeBoundary = \"boundary\" Field Value Type Description String | Improve this Doc View Source ContentTypeCharset Declaration public const string ContentTypeCharset = \"charset\" Field Value Type Description String | Improve this Doc View Source Expect Declaration public const string Expect = \"Expect\" Field Value Type Description String | Improve this Doc View Source Expect100Continue Declaration public const string Expect100Continue = \"100-continue\" Field Value Type Description String | Improve this Doc View Source Host Declaration public const string Host = \"Host\" Field Value Type Description String | Improve this Doc View Source Location Declaration public const string Location = \"Location\" Field Value Type Description String | Improve this Doc View Source ProxyAuthenticate Declaration public const string ProxyAuthenticate = \"Proxy-Authenticate\" Field Value Type Description String | Improve this Doc View Source ProxyAuthorization Declaration public const string ProxyAuthorization = \"Proxy-Authorization\" Field Value Type Description String | Improve this Doc View Source ProxyAuthorizationBasic Declaration public const string ProxyAuthorizationBasic = \"basic\" Field Value Type Description String | Improve this Doc View Source ProxyConnection Declaration public const string ProxyConnection = \"Proxy-Connection\" Field Value Type Description String | Improve this Doc View Source ProxyConnectionClose Declaration public const string ProxyConnectionClose = \"close\" Field Value Type Description String | Improve this Doc View Source TransferEncoding Declaration public const string TransferEncoding = \"Transfer-Encoding\" Field Value Type Description String | Improve this Doc View Source TransferEncodingChunked Declaration public const string TransferEncodingChunked = \"chunked\" Field Value Type Description String | Improve this Doc View Source Upgrade Declaration public const string Upgrade = \"Upgrade\" Field Value Type Description String | Improve this Doc View Source UpgradeWebsocket Declaration public const string UpgradeWebsocket = \"websocket\" Field Value Type Description String"
},
"api/Titanium.Web.Proxy.Http.Request.html": {
"href": "api/Titanium.Web.Proxy.Http.Request.html",
"title": "Class Request | Titanium Web Proxy",
- "keywords": "Class Request Http(s) request object Inheritance Object RequestResponseBase Request ConnectRequest Inherited Members RequestResponseBase.BodyInternal RequestResponseBase.KeepBody RequestResponseBase.HttpVersion RequestResponseBase.Headers RequestResponseBase.ContentLength RequestResponseBase.ContentEncoding RequestResponseBase.Encoding RequestResponseBase.ContentType RequestResponseBase.IsChunked RequestResponseBase.Body RequestResponseBase.BodyString RequestResponseBase.IsBodyRead RequestResponseBase.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.Http Assembly : Titanium.Web.Proxy.dll Syntax [TypeConverter(typeof(ExpandableObjectConverter))] public class Request : RequestResponseBase Properties | Improve this Doc View Source ExpectationFailed Did server respond negatively for 100 continue request? Declaration public bool ExpectationFailed { get; } Property Value Type Description Boolean | Improve this Doc View Source ExpectationSucceeded Did server respond positively for 100 continue request? Declaration public bool ExpectationSucceeded { get; } Property Value Type Description Boolean | Improve this Doc View Source ExpectContinue Does this request has a 100-continue header? Declaration public bool ExpectContinue { get; } Property Value Type Description Boolean | Improve this Doc View Source HasBody Has request body? Declaration public override bool HasBody { get; } Property Value Type Description Boolean Overrides RequestResponseBase.HasBody | Improve this Doc View Source HeaderText Gets the header text. Declaration public override string HeaderText { get; } Property Value Type Description String Overrides RequestResponseBase.HeaderText | Improve this Doc View Source Host Http hostname header value if exists. Note: Changing this does NOT change host in RequestUri. Users can set new RequestUri separately. Declaration public string Host { get; set; } Property Value Type Description String | Improve this Doc View Source IsHttps Is Https? Declaration public bool IsHttps { get; } Property Value Type Description Boolean | Improve this Doc View Source IsMultipartFormData Does this request contain multipart/form-data? Declaration public bool IsMultipartFormData { get; } Property Value Type Description Boolean | Improve this Doc View Source Method Request Method. Declaration public string Method { get; set; } Property Value Type Description String | Improve this Doc View Source OriginalUrl The original request Url. Declaration public string OriginalUrl { get; } Property Value Type Description String | Improve this Doc View Source RequestUri Request HTTP Uri. Declaration public Uri RequestUri { get; set; } Property Value Type Description Uri | Improve this Doc View Source RequestUriString The request uri as it is in the HTTP header Declaration public string RequestUriString { get; set; } Property Value Type Description String | Improve this Doc View Source UpgradeToWebSocket Does this request has an upgrade to websocket header? Declaration public bool UpgradeToWebSocket { get; } Property Value Type Description Boolean | Improve this Doc View Source Url Request Url. Declaration public string Url { get; } Property Value Type Description String"
+ "keywords": "Class Request Http(s) request object Inheritance Object RequestResponseBase Request ConnectRequest Inherited Members RequestResponseBase.BodyInternal RequestResponseBase.KeepBody RequestResponseBase.HttpVersion RequestResponseBase.Headers RequestResponseBase.ContentLength RequestResponseBase.ContentEncoding RequestResponseBase.Encoding RequestResponseBase.ContentType RequestResponseBase.IsChunked RequestResponseBase.Body RequestResponseBase.BodyString RequestResponseBase.IsBodyRead RequestResponseBase.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Namespace : Titanium.Web.Proxy.Http Assembly : Titanium.Web.Proxy.dll Syntax [TypeConverter(typeof(ExpandableObjectConverter))] public class Request : RequestResponseBase Properties | Improve this Doc View Source ExpectationFailed Did server respond negatively for 100 continue request? Declaration public bool ExpectationFailed { get; } Property Value Type Description Boolean | Improve this Doc View Source ExpectationSucceeded Did server respond positively for 100 continue request? Declaration public bool ExpectationSucceeded { get; } Property Value Type Description Boolean | Improve this Doc View Source ExpectContinue Does this request has a 100-continue header? Declaration public bool ExpectContinue { get; } Property Value Type Description Boolean | Improve this Doc View Source HasBody Has request body? Declaration public override bool HasBody { get; } Property Value Type Description Boolean Overrides RequestResponseBase.HasBody | Improve this Doc View Source HeaderText Gets the header text. Declaration public override string HeaderText { get; } Property Value Type Description String Overrides RequestResponseBase.HeaderText | Improve this Doc View Source Host Http hostname header value if exists. Note: Changing this does NOT change host in RequestUri. Users can set new RequestUri separately. Declaration public string Host { get; set; } Property Value Type Description String | Improve this Doc View Source IsHttps Is Https? Declaration public bool IsHttps { get; } Property Value Type Description Boolean | Improve this Doc View Source IsMultipartFormData Does this request contain multipart/form-data? Declaration public bool IsMultipartFormData { get; } Property Value Type Description Boolean | Improve this Doc View Source Method Request Method. Declaration public string Method { get; set; } Property Value Type Description String | Improve this Doc View Source OriginalUrl The original request Url. Declaration public string OriginalUrl { get; } Property Value Type Description String | Improve this Doc View Source RequestUri Request HTTP Uri. Declaration public Uri RequestUri { get; set; } Property Value Type Description Uri | Improve this Doc View Source RequestUriString The request uri as it is in the HTTP header Declaration public string RequestUriString { get; set; } Property Value Type Description String | Improve this Doc View Source UpgradeToWebSocket Does this request has an upgrade to websocket header? Declaration public bool UpgradeToWebSocket { get; } Property Value Type Description Boolean | Improve this Doc View Source Url Request Url. Declaration public string Url { get; } Property Value Type Description String"
},
"api/Titanium.Web.Proxy.Http.RequestResponseBase.html": {
"href": "api/Titanium.Web.Proxy.Http.RequestResponseBase.html",
"title": "Class RequestResponseBase | Titanium Web Proxy",
- "keywords": "Class RequestResponseBase Abstract base class for similar objects shared by both request and response objects. Inheritance Object RequestResponseBase Request Response Inherited Members Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.Http Assembly : Titanium.Web.Proxy.dll Syntax public abstract class RequestResponseBase Properties | Improve this Doc View Source Body Body as byte array Declaration [Browsable(false)] public byte[] Body { get; } Property Value Type Description Byte [] | Improve this Doc View Source BodyInternal Cached body content as byte array. Declaration protected byte[] BodyInternal { get; } Property Value Type Description Byte [] | Improve this Doc View Source BodyString Body as string. Use the encoding specified to decode the byte[] data to string Declaration [Browsable(false)] public string BodyString { get; } Property Value Type Description String | Improve this Doc View Source ContentEncoding Content encoding for this request/response. Declaration public string ContentEncoding { get; } Property Value Type Description String | Improve this Doc View Source ContentLength Length of the body. Declaration public long ContentLength { get; set; } Property Value Type Description Int64 | Improve this Doc View Source ContentType Content-type of the request/response. Declaration public string ContentType { get; set; } Property Value Type Description String | Improve this Doc View Source Encoding Encoding for this request/response. Declaration public Encoding Encoding { get; } Property Value Type Description Encoding | Improve this Doc View Source HasBody Has the request/response body? Declaration public abstract bool HasBody { get; } Property Value Type Description Boolean | Improve this Doc View Source Headers Collection of all headers. Declaration public HeaderCollection Headers { get; } Property Value Type Description HeaderCollection | Improve this Doc View Source HeaderText The header text. Declaration public abstract string HeaderText { get; } Property Value Type Description String | Improve this Doc View Source HttpVersion Http Version. Declaration public Version HttpVersion { get; set; } Property Value Type Description Version | Improve this Doc View Source IsBodyRead Was the body read by user? Declaration public bool IsBodyRead { get; } Property Value Type Description Boolean | Improve this Doc View Source IsChunked Is body send as chunked bytes. Declaration public bool IsChunked { get; set; } Property Value Type Description Boolean | Improve this Doc View Source KeepBody Keeps the body data after the session is finished. Declaration public bool KeepBody { get; set; } Property Value Type Description Boolean Methods | Improve this Doc View Source ToString() Declaration public override string ToString() Returns Type Description String Overrides Object.ToString()"
+ "keywords": "Class RequestResponseBase Abstract base class for similar objects shared by both request and response objects. Inheritance Object RequestResponseBase Request Response Inherited Members Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Namespace : Titanium.Web.Proxy.Http Assembly : Titanium.Web.Proxy.dll Syntax public abstract class RequestResponseBase Properties | Improve this Doc View Source Body Body as byte array Declaration [Browsable(false)] public byte[] Body { get; } Property Value Type Description Byte [] | Improve this Doc View Source BodyInternal Cached body content as byte array. Declaration protected byte[] BodyInternal { get; } Property Value Type Description Byte [] | Improve this Doc View Source BodyString Body as string. Use the encoding specified to decode the byte[] data to string Declaration [Browsable(false)] public string BodyString { get; } Property Value Type Description String | Improve this Doc View Source ContentEncoding Content encoding for this request/response. Declaration public string ContentEncoding { get; } Property Value Type Description String | Improve this Doc View Source ContentLength Length of the body. Declaration public long ContentLength { get; set; } Property Value Type Description Int64 | Improve this Doc View Source ContentType Content-type of the request/response. Declaration public string ContentType { get; set; } Property Value Type Description String | Improve this Doc View Source Encoding Encoding for this request/response. Declaration public Encoding Encoding { get; } Property Value Type Description Encoding | Improve this Doc View Source HasBody Has the request/response body? Declaration public abstract bool HasBody { get; } Property Value Type Description Boolean | Improve this Doc View Source Headers Collection of all headers. Declaration public HeaderCollection Headers { get; } Property Value Type Description HeaderCollection | Improve this Doc View Source HeaderText The header text. Declaration public abstract string HeaderText { get; } Property Value Type Description String | Improve this Doc View Source HttpVersion Http Version. Declaration public Version HttpVersion { get; set; } Property Value Type Description Version | Improve this Doc View Source IsBodyRead Was the body read by user? Declaration public bool IsBodyRead { get; } Property Value Type Description Boolean | Improve this Doc View Source IsChunked Is body send as chunked bytes. Declaration public bool IsChunked { get; set; } Property Value Type Description Boolean | Improve this Doc View Source KeepBody Keeps the body data after the session is finished. Declaration public bool KeepBody { get; set; } Property Value Type Description Boolean Methods | Improve this Doc View Source ToString() Declaration public override string ToString() Returns Type Description String Overrides Object.ToString()"
},
"api/Titanium.Web.Proxy.Http.Response.html": {
"href": "api/Titanium.Web.Proxy.Http.Response.html",
"title": "Class Response | Titanium Web Proxy",
- "keywords": "Class Response Http(s) response object Inheritance Object RequestResponseBase Response ConnectResponse GenericResponse OkResponse RedirectResponse Inherited Members RequestResponseBase.BodyInternal RequestResponseBase.KeepBody RequestResponseBase.HttpVersion RequestResponseBase.Headers RequestResponseBase.ContentLength RequestResponseBase.ContentEncoding RequestResponseBase.Encoding RequestResponseBase.ContentType RequestResponseBase.IsChunked RequestResponseBase.Body RequestResponseBase.BodyString RequestResponseBase.IsBodyRead RequestResponseBase.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.Http Assembly : Titanium.Web.Proxy.dll Syntax [TypeConverter(typeof(ExpandableObjectConverter))] public class Response : RequestResponseBase Constructors | Improve this Doc View Source Response() Constructor. Declaration public Response() | Improve this Doc View Source Response(Byte[]) Constructor. Declaration public Response(byte[] body) Parameters Type Name Description Byte [] body Properties | Improve this Doc View Source HasBody Has response body? Declaration public override bool HasBody { get; } Property Value Type Description Boolean Overrides RequestResponseBase.HasBody | Improve this Doc View Source HeaderText Gets the header text. Declaration public override string HeaderText { get; } Property Value Type Description String Overrides RequestResponseBase.HeaderText | Improve this Doc View Source KeepAlive Keep the connection alive? Declaration public bool KeepAlive { get; } Property Value Type Description Boolean | Improve this Doc View Source StatusCode Response Status Code. Declaration public int StatusCode { get; set; } Property Value Type Description Int32 | Improve this Doc View Source StatusDescription Response Status description. Declaration public string StatusDescription { get; set; } Property Value Type Description String"
+ "keywords": "Class Response Http(s) response object Inheritance Object RequestResponseBase Response ConnectResponse GenericResponse OkResponse RedirectResponse Inherited Members RequestResponseBase.BodyInternal RequestResponseBase.KeepBody RequestResponseBase.HttpVersion RequestResponseBase.Headers RequestResponseBase.ContentLength RequestResponseBase.ContentEncoding RequestResponseBase.Encoding RequestResponseBase.ContentType RequestResponseBase.IsChunked RequestResponseBase.Body RequestResponseBase.BodyString RequestResponseBase.IsBodyRead RequestResponseBase.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Namespace : Titanium.Web.Proxy.Http Assembly : Titanium.Web.Proxy.dll Syntax [TypeConverter(typeof(ExpandableObjectConverter))] public class Response : RequestResponseBase Constructors | Improve this Doc View Source Response() Constructor. Declaration public Response() | Improve this Doc View Source Response(Byte[]) Constructor. Declaration public Response(byte[] body) Parameters Type Name Description Byte [] body Properties | Improve this Doc View Source HasBody Has response body? Declaration public override bool HasBody { get; } Property Value Type Description Boolean Overrides RequestResponseBase.HasBody | Improve this Doc View Source HeaderText Gets the header text. Declaration public override string HeaderText { get; } Property Value Type Description String Overrides RequestResponseBase.HeaderText | Improve this Doc View Source KeepAlive Keep the connection alive? Declaration public bool KeepAlive { get; } Property Value Type Description Boolean | Improve this Doc View Source StatusCode Response Status Code. Declaration public int StatusCode { get; set; } Property Value Type Description Int32 | Improve this Doc View Source StatusDescription Response Status description. Declaration public string StatusDescription { get; set; } Property Value Type Description String"
},
"api/Titanium.Web.Proxy.Http.Responses.GenericResponse.html": {
"href": "api/Titanium.Web.Proxy.Http.Responses.GenericResponse.html",
"title": "Class GenericResponse | Titanium Web Proxy",
- "keywords": "Class GenericResponse Anything other than a 200 or 302 http response. Inheritance Object RequestResponseBase Response GenericResponse Inherited Members Response.StatusCode Response.StatusDescription Response.HasBody Response.KeepAlive Response.HeaderText RequestResponseBase.BodyInternal RequestResponseBase.KeepBody RequestResponseBase.HttpVersion RequestResponseBase.Headers RequestResponseBase.ContentLength RequestResponseBase.ContentEncoding RequestResponseBase.Encoding RequestResponseBase.ContentType RequestResponseBase.IsChunked RequestResponseBase.Body RequestResponseBase.BodyString RequestResponseBase.IsBodyRead RequestResponseBase.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.Http.Responses Assembly : Titanium.Web.Proxy.dll Syntax public class GenericResponse : Response Constructors | Improve this Doc View Source GenericResponse(Int32, String) Constructor. Declaration public GenericResponse(int statusCode, string statusDescription) Parameters Type Name Description Int32 statusCode String statusDescription | Improve this Doc View Source GenericResponse(HttpStatusCode) Constructor. Declaration public GenericResponse(HttpStatusCode status) Parameters Type Name Description HttpStatusCode status"
+ "keywords": "Class GenericResponse Anything other than a 200 or 302 http response. Inheritance Object RequestResponseBase Response GenericResponse Inherited Members Response.StatusCode Response.StatusDescription Response.HasBody Response.KeepAlive Response.HeaderText RequestResponseBase.BodyInternal RequestResponseBase.KeepBody RequestResponseBase.HttpVersion RequestResponseBase.Headers RequestResponseBase.ContentLength RequestResponseBase.ContentEncoding RequestResponseBase.Encoding RequestResponseBase.ContentType RequestResponseBase.IsChunked RequestResponseBase.Body RequestResponseBase.BodyString RequestResponseBase.IsBodyRead RequestResponseBase.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Namespace : Titanium.Web.Proxy.Http.Responses Assembly : Titanium.Web.Proxy.dll Syntax public class GenericResponse : Response Constructors | Improve this Doc View Source GenericResponse(Int32, String) Constructor. Declaration public GenericResponse(int statusCode, string statusDescription) Parameters Type Name Description Int32 statusCode String statusDescription | Improve this Doc View Source GenericResponse(HttpStatusCode) Constructor. Declaration public GenericResponse(HttpStatusCode status) Parameters Type Name Description HttpStatusCode status"
},
"api/Titanium.Web.Proxy.Http.Responses.html": {
"href": "api/Titanium.Web.Proxy.Http.Responses.html",
@@ -157,32 +157,32 @@
"api/Titanium.Web.Proxy.Http.Responses.OkResponse.html": {
"href": "api/Titanium.Web.Proxy.Http.Responses.OkResponse.html",
"title": "Class OkResponse | Titanium Web Proxy",
- "keywords": "Class OkResponse The http 200 Ok response. Inheritance Object RequestResponseBase Response OkResponse Inherited Members Response.StatusCode Response.StatusDescription Response.HasBody Response.KeepAlive Response.HeaderText RequestResponseBase.BodyInternal RequestResponseBase.KeepBody RequestResponseBase.HttpVersion RequestResponseBase.Headers RequestResponseBase.ContentLength RequestResponseBase.ContentEncoding RequestResponseBase.Encoding RequestResponseBase.ContentType RequestResponseBase.IsChunked RequestResponseBase.Body RequestResponseBase.BodyString RequestResponseBase.IsBodyRead RequestResponseBase.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.Http.Responses Assembly : Titanium.Web.Proxy.dll Syntax public sealed class OkResponse : Response Constructors | Improve this Doc View Source OkResponse() Constructor. Declaration public OkResponse() | Improve this Doc View Source OkResponse(Byte[]) Constructor. Declaration public OkResponse(byte[] body) Parameters Type Name Description Byte [] body"
+ "keywords": "Class OkResponse The http 200 Ok response. Inheritance Object RequestResponseBase Response OkResponse Inherited Members Response.StatusCode Response.StatusDescription Response.HasBody Response.KeepAlive Response.HeaderText RequestResponseBase.BodyInternal RequestResponseBase.KeepBody RequestResponseBase.HttpVersion RequestResponseBase.Headers RequestResponseBase.ContentLength RequestResponseBase.ContentEncoding RequestResponseBase.Encoding RequestResponseBase.ContentType RequestResponseBase.IsChunked RequestResponseBase.Body RequestResponseBase.BodyString RequestResponseBase.IsBodyRead RequestResponseBase.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Namespace : Titanium.Web.Proxy.Http.Responses Assembly : Titanium.Web.Proxy.dll Syntax public sealed class OkResponse : Response Constructors | Improve this Doc View Source OkResponse() Constructor. Declaration public OkResponse() | Improve this Doc View Source OkResponse(Byte[]) Constructor. Declaration public OkResponse(byte[] body) Parameters Type Name Description Byte [] body"
},
"api/Titanium.Web.Proxy.Http.Responses.RedirectResponse.html": {
"href": "api/Titanium.Web.Proxy.Http.Responses.RedirectResponse.html",
"title": "Class RedirectResponse | Titanium Web Proxy",
- "keywords": "Class RedirectResponse The http redirect response. Inheritance Object RequestResponseBase Response RedirectResponse Inherited Members Response.StatusCode Response.StatusDescription Response.HasBody Response.KeepAlive Response.HeaderText RequestResponseBase.BodyInternal RequestResponseBase.KeepBody RequestResponseBase.HttpVersion RequestResponseBase.Headers RequestResponseBase.ContentLength RequestResponseBase.ContentEncoding RequestResponseBase.Encoding RequestResponseBase.ContentType RequestResponseBase.IsChunked RequestResponseBase.Body RequestResponseBase.BodyString RequestResponseBase.IsBodyRead RequestResponseBase.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.Http.Responses Assembly : Titanium.Web.Proxy.dll Syntax public sealed class RedirectResponse : Response Constructors | Improve this Doc View Source RedirectResponse() Initializes a new instance of the RedirectResponse class. Declaration public RedirectResponse()"
+ "keywords": "Class RedirectResponse The http redirect response. Inheritance Object RequestResponseBase Response RedirectResponse Inherited Members Response.StatusCode Response.StatusDescription Response.HasBody Response.KeepAlive Response.HeaderText RequestResponseBase.BodyInternal RequestResponseBase.KeepBody RequestResponseBase.HttpVersion RequestResponseBase.Headers RequestResponseBase.ContentLength RequestResponseBase.ContentEncoding RequestResponseBase.Encoding RequestResponseBase.ContentType RequestResponseBase.IsChunked RequestResponseBase.Body RequestResponseBase.BodyString RequestResponseBase.IsBodyRead RequestResponseBase.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Namespace : Titanium.Web.Proxy.Http.Responses Assembly : Titanium.Web.Proxy.dll Syntax public sealed class RedirectResponse : Response Constructors | Improve this Doc View Source RedirectResponse() Initializes a new instance of the RedirectResponse class. Declaration public RedirectResponse()"
},
"api/Titanium.Web.Proxy.Http2.Hpack.Decoder.html": {
"href": "api/Titanium.Web.Proxy.Http2.Hpack.Decoder.html",
"title": "Class Decoder | Titanium Web Proxy",
- "keywords": "Class Decoder Inheritance Object Decoder 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.Http2.Hpack Assembly : Titanium.Web.Proxy.dll Syntax public class Decoder Constructors | Improve this Doc View Source Decoder(Int32, Int32) Initializes a new instance of the Decoder class. Declaration public Decoder(int maxHeaderSize, int maxHeaderTableSize) Parameters Type Name Description Int32 maxHeaderSize Max header size. Int32 maxHeaderTableSize Max header table size. Methods | Improve this Doc View Source Decode(BinaryReader, IHeaderListener) Decode the header block into header fields. Declaration public void Decode(BinaryReader input, IHeaderListener headerListener) Parameters Type Name Description BinaryReader input Input. IHeaderListener headerListener Header listener. | Improve this Doc View Source EndHeaderBlock() End the current header block. Returns if the header field has been truncated. This must be called after the header block has been completely decoded. Declaration public bool EndHeaderBlock() Returns Type Description Boolean true , if header block was ended, false otherwise. | Improve this Doc View Source GetMaxHeaderTableSize() Return the maximum table size. This is the maximum size allowed by both the encoder and the decoder. Declaration public int GetMaxHeaderTableSize() Returns Type Description Int32 The max header table size. | Improve this Doc View Source SetMaxHeaderTableSize(Int32) Set the maximum table size. If this is below the maximum size of the dynamic table used by the encoder, the beginning of the next header block MUST signal this change. Declaration public void SetMaxHeaderTableSize(int maxHeaderTableSize) Parameters Type Name Description Int32 maxHeaderTableSize Max header table size."
+ "keywords": "Class Decoder Inheritance Object Decoder Inherited Members Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Object.ToString() Namespace : Titanium.Web.Proxy.Http2.Hpack Assembly : Titanium.Web.Proxy.dll Syntax public class Decoder Constructors | Improve this Doc View Source Decoder(Int32, Int32) Initializes a new instance of the Decoder class. Declaration public Decoder(int maxHeaderSize, int maxHeaderTableSize) Parameters Type Name Description Int32 maxHeaderSize Max header size. Int32 maxHeaderTableSize Max header table size. Methods | Improve this Doc View Source Decode(BinaryReader, IHeaderListener) Decode the header block into header fields. Declaration public void Decode(BinaryReader input, IHeaderListener headerListener) Parameters Type Name Description BinaryReader input Input. IHeaderListener headerListener Header listener. | Improve this Doc View Source EndHeaderBlock() End the current header block. Returns if the header field has been truncated. This must be called after the header block has been completely decoded. Declaration public bool EndHeaderBlock() Returns Type Description Boolean true , if header block was ended, false otherwise. | Improve this Doc View Source GetMaxHeaderTableSize() Return the maximum table size. This is the maximum size allowed by both the encoder and the decoder. Declaration public int GetMaxHeaderTableSize() Returns Type Description Int32 The max header table size. | Improve this Doc View Source SetMaxHeaderTableSize(Int32) Set the maximum table size. If this is below the maximum size of the dynamic table used by the encoder, the beginning of the next header block MUST signal this change. Declaration public void SetMaxHeaderTableSize(int maxHeaderTableSize) Parameters Type Name Description Int32 maxHeaderTableSize Max header table size."
},
"api/Titanium.Web.Proxy.Http2.Hpack.DynamicTable.html": {
"href": "api/Titanium.Web.Proxy.Http2.Hpack.DynamicTable.html",
"title": "Class DynamicTable | Titanium Web Proxy",
- "keywords": "Class DynamicTable Inheritance Object DynamicTable 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.Http2.Hpack Assembly : Titanium.Web.Proxy.dll Syntax public class DynamicTable Constructors | Improve this Doc View Source DynamicTable(Int32) Creates a new dynamic table with the specified initial capacity. Declaration public DynamicTable(int initialCapacity) Parameters Type Name Description Int32 initialCapacity Initial capacity. Properties | Improve this Doc View Source Capacity Return the maximum allowable size of the dynamic table. Declaration public int Capacity { get; } Property Value Type Description Int32 The capacity. | Improve this Doc View Source Size Return the current size of the dynamic table. This is the sum of the size of the entries. Declaration public int Size { get; } Property Value Type Description Int32 The size. Methods | Improve this Doc View Source Add(HttpHeader) Add the header field to the dynamic table. Entries are evicted from the dynamic table until the size of the table and the new header field is less than or equal to the table's capacity. If the size of the new entry is larger than the table's capacity, the dynamic table will be cleared. Declaration public void Add(HttpHeader header) Parameters Type Name Description HttpHeader header Header. | Improve this Doc View Source Clear() Remove all entries from the dynamic table. Declaration public void Clear() | Improve this Doc View Source GetEntry(Int32) Return the header field at the given index. The first and newest entry is always at index 1, and the oldest entry is at the index length(). Declaration public HttpHeader GetEntry(int index) Parameters Type Name Description Int32 index Index. Returns Type Description HttpHeader The entry. | Improve this Doc View Source Length() Return the number of header fields in the dynamic table. Declaration public int Length() Returns Type Description Int32 | Improve this Doc View Source Remove() Remove and return the oldest header field from the dynamic table. Declaration public HttpHeader Remove() Returns Type Description HttpHeader | Improve this Doc View Source SetCapacity(Int32) Set the maximum size of the dynamic table. Entries are evicted from the dynamic table until the size of the table is less than or equal to the maximum size. Declaration public void SetCapacity(int capacity) Parameters Type Name Description Int32 capacity Capacity."
+ "keywords": "Class DynamicTable Inheritance Object DynamicTable Inherited Members Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Object.ToString() Namespace : Titanium.Web.Proxy.Http2.Hpack Assembly : Titanium.Web.Proxy.dll Syntax public class DynamicTable Constructors | Improve this Doc View Source DynamicTable(Int32) Creates a new dynamic table with the specified initial capacity. Declaration public DynamicTable(int initialCapacity) Parameters Type Name Description Int32 initialCapacity Initial capacity. Properties | Improve this Doc View Source Capacity Return the maximum allowable size of the dynamic table. Declaration public int Capacity { get; } Property Value Type Description Int32 The capacity. | Improve this Doc View Source Size Return the current size of the dynamic table. This is the sum of the size of the entries. Declaration public int Size { get; } Property Value Type Description Int32 The size. Methods | Improve this Doc View Source Add(HttpHeader) Add the header field to the dynamic table. Entries are evicted from the dynamic table until the size of the table and the new header field is less than or equal to the table's capacity. If the size of the new entry is larger than the table's capacity, the dynamic table will be cleared. Declaration public void Add(HttpHeader header) Parameters Type Name Description HttpHeader header Header. | Improve this Doc View Source Clear() Remove all entries from the dynamic table. Declaration public void Clear() | Improve this Doc View Source GetEntry(Int32) Return the header field at the given index. The first and newest entry is always at index 1, and the oldest entry is at the index length(). Declaration public HttpHeader GetEntry(int index) Parameters Type Name Description Int32 index Index. Returns Type Description HttpHeader The entry. | Improve this Doc View Source Length() Return the number of header fields in the dynamic table. Declaration public int Length() Returns Type Description Int32 | Improve this Doc View Source Remove() Remove and return the oldest header field from the dynamic table. Declaration public HttpHeader Remove() Returns Type Description HttpHeader | Improve this Doc View Source SetCapacity(Int32) Set the maximum size of the dynamic table. Entries are evicted from the dynamic table until the size of the table is less than or equal to the maximum size. Declaration public void SetCapacity(int capacity) Parameters Type Name Description Int32 capacity Capacity."
},
"api/Titanium.Web.Proxy.Http2.Hpack.Encoder.html": {
"href": "api/Titanium.Web.Proxy.Http2.Hpack.Encoder.html",
"title": "Class Encoder | Titanium Web Proxy",
- "keywords": "Class Encoder Inheritance Object Encoder 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.Http2.Hpack Assembly : Titanium.Web.Proxy.dll Syntax public class Encoder Constructors | Improve this Doc View Source Encoder(Int32) Initializes a new instance of the Encoder class. Declaration public Encoder(int maxHeaderTableSize) Parameters Type Name Description Int32 maxHeaderTableSize Max header table size. Properties | Improve this Doc View Source MaxHeaderTableSize Gets the the maximum table size. Declaration public int MaxHeaderTableSize { get; } Property Value Type Description Int32 The max header table size. Methods | Improve this Doc View Source EncodeHeader(BinaryWriter, String, String, Boolean, HpackUtil.IndexType, Boolean) Encode the header field into the header block. Declaration public void EncodeHeader(BinaryWriter output, string name, string value, bool sensitive = false, HpackUtil.IndexType indexType = HpackUtil.IndexType.Incremental, bool useStaticName = true) Parameters Type Name Description BinaryWriter output Output. String name Name. String value Value. Boolean sensitive If set to true sensitive. HpackUtil.IndexType indexType Index type. Boolean useStaticName Use static name. | Improve this Doc View Source SetMaxHeaderTableSize(BinaryWriter, Int32) Set the maximum table size. Declaration public void SetMaxHeaderTableSize(BinaryWriter output, int maxHeaderTableSize) Parameters Type Name Description BinaryWriter output Output. Int32 maxHeaderTableSize Max header table size."
+ "keywords": "Class Encoder Inheritance Object Encoder Inherited Members Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Object.ToString() Namespace : Titanium.Web.Proxy.Http2.Hpack Assembly : Titanium.Web.Proxy.dll Syntax public class Encoder Constructors | Improve this Doc View Source Encoder(Int32) Initializes a new instance of the Encoder class. Declaration public Encoder(int maxHeaderTableSize) Parameters Type Name Description Int32 maxHeaderTableSize Max header table size. Properties | Improve this Doc View Source MaxHeaderTableSize Gets the the maximum table size. Declaration public int MaxHeaderTableSize { get; } Property Value Type Description Int32 The max header table size. Methods | Improve this Doc View Source EncodeHeader(BinaryWriter, String, String, Boolean, HpackUtil.IndexType, Boolean) Encode the header field into the header block. Declaration public void EncodeHeader(BinaryWriter output, string name, string value, bool sensitive = false, HpackUtil.IndexType indexType = HpackUtil.IndexType.Incremental, bool useStaticName = true) Parameters Type Name Description BinaryWriter output Output. String name Name. String value Value. Boolean sensitive If set to true sensitive. HpackUtil.IndexType indexType Index type. Boolean useStaticName Use static name. | Improve this Doc View Source SetMaxHeaderTableSize(BinaryWriter, Int32) Set the maximum table size. Declaration public void SetMaxHeaderTableSize(BinaryWriter output, int maxHeaderTableSize) Parameters Type Name Description BinaryWriter output Output. Int32 maxHeaderTableSize Max header table size."
},
"api/Titanium.Web.Proxy.Http2.Hpack.HpackUtil.html": {
"href": "api/Titanium.Web.Proxy.Http2.Hpack.HpackUtil.html",
"title": "Class HpackUtil | Titanium Web Proxy",
- "keywords": "Class HpackUtil Inheritance Object HpackUtil 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.Http2.Hpack Assembly : Titanium.Web.Proxy.dll Syntax public static class HpackUtil Fields | Improve this Doc View Source HuffmanCodeLengths Declaration public static readonly byte[] HuffmanCodeLengths Field Value Type Description Byte [] | Improve this Doc View Source HuffmanCodes Declaration public static readonly int[] HuffmanCodes Field Value Type Description Int32 [] | Improve this Doc View Source HuffmanEos Declaration public const int HuffmanEos = 256 Field Value Type Description Int32"
+ "keywords": "Class HpackUtil Inheritance Object HpackUtil Inherited Members Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Object.ToString() Namespace : Titanium.Web.Proxy.Http2.Hpack Assembly : Titanium.Web.Proxy.dll Syntax public static class HpackUtil Fields | Improve this Doc View Source HuffmanCodeLengths Declaration public static readonly byte[] HuffmanCodeLengths Field Value Type Description Byte [] | Improve this Doc View Source HuffmanCodes Declaration public static readonly int[] HuffmanCodes Field Value Type Description Int32 [] | Improve this Doc View Source HuffmanEos Declaration public const int HuffmanEos = 256 Field Value Type Description Int32"
},
"api/Titanium.Web.Proxy.Http2.Hpack.HpackUtil.IndexType.html": {
"href": "api/Titanium.Web.Proxy.Http2.Hpack.HpackUtil.IndexType.html",
@@ -197,12 +197,12 @@
"api/Titanium.Web.Proxy.Http2.Hpack.HuffmanDecoder.html": {
"href": "api/Titanium.Web.Proxy.Http2.Hpack.HuffmanDecoder.html",
"title": "Class HuffmanDecoder | Titanium Web Proxy",
- "keywords": "Class HuffmanDecoder Inheritance Object HuffmanDecoder 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.Http2.Hpack Assembly : Titanium.Web.Proxy.dll Syntax public class HuffmanDecoder Fields | Improve this Doc View Source Instance Huffman Decoder Declaration public static readonly HuffmanDecoder Instance Field Value Type Description HuffmanDecoder Methods | Improve this Doc View Source Decode(Byte[]) Decompresses the given Huffman coded string literal. Declaration public string Decode(byte[] buf) Parameters Type Name Description Byte [] buf the string literal to be decoded Returns Type Description String the output stream for the compressed data Exceptions Type Condition IOException throws IOException if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed."
+ "keywords": "Class HuffmanDecoder Inheritance Object HuffmanDecoder Inherited Members Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Object.ToString() Namespace : Titanium.Web.Proxy.Http2.Hpack Assembly : Titanium.Web.Proxy.dll Syntax public class HuffmanDecoder Fields | Improve this Doc View Source Instance Huffman Decoder Declaration public static readonly HuffmanDecoder Instance Field Value Type Description HuffmanDecoder Methods | Improve this Doc View Source Decode(Byte[]) Decompresses the given Huffman coded string literal. Declaration public string Decode(byte[] buf) Parameters Type Name Description Byte [] buf the string literal to be decoded Returns Type Description String the output stream for the compressed data Exceptions Type Condition IOException throws IOException if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed."
},
"api/Titanium.Web.Proxy.Http2.Hpack.HuffmanEncoder.html": {
"href": "api/Titanium.Web.Proxy.Http2.Hpack.HuffmanEncoder.html",
"title": "Class HuffmanEncoder | Titanium Web Proxy",
- "keywords": "Class HuffmanEncoder Inheritance Object HuffmanEncoder 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.Http2.Hpack Assembly : Titanium.Web.Proxy.dll Syntax public class HuffmanEncoder Fields | Improve this Doc View Source Instance Huffman Encoder Declaration public static readonly HuffmanEncoder Instance Field Value Type Description HuffmanEncoder Methods | Improve this Doc View Source Encode(BinaryWriter, Byte[]) Compresses the input string literal using the Huffman coding. Declaration public void Encode(BinaryWriter output, byte[] data) Parameters Type Name Description BinaryWriter output the output stream for the compressed data Byte [] data the string literal to be Huffman encoded Exceptions Type Condition IOException if an I/O error occurs. | Improve this Doc View Source Encode(BinaryWriter, Byte[], Int32, Int32) Compresses the input string literal using the Huffman coding. Declaration public void Encode(BinaryWriter output, byte[] data, int off, int len) Parameters Type Name Description BinaryWriter output the output stream for the compressed data Byte [] data the string literal to be Huffman encoded Int32 off the start offset in the data Int32 len the number of bytes to encode Exceptions Type Condition IOException if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed. | Improve this Doc View Source GetEncodedLength(Byte[]) Returns the number of bytes required to Huffman encode the input string literal. Declaration public int GetEncodedLength(byte[] data) Parameters Type Name Description Byte [] data the string literal to be Huffman encoded Returns Type Description Int32 the number of bytes required to Huffman encode data"
+ "keywords": "Class HuffmanEncoder Inheritance Object HuffmanEncoder Inherited Members Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Object.ToString() Namespace : Titanium.Web.Proxy.Http2.Hpack Assembly : Titanium.Web.Proxy.dll Syntax public class HuffmanEncoder Fields | Improve this Doc View Source Instance Huffman Encoder Declaration public static readonly HuffmanEncoder Instance Field Value Type Description HuffmanEncoder Methods | Improve this Doc View Source Encode(BinaryWriter, Byte[]) Compresses the input string literal using the Huffman coding. Declaration public void Encode(BinaryWriter output, byte[] data) Parameters Type Name Description BinaryWriter output the output stream for the compressed data Byte [] data the string literal to be Huffman encoded Exceptions Type Condition IOException if an I/O error occurs. | Improve this Doc View Source Encode(BinaryWriter, Byte[], Int32, Int32) Compresses the input string literal using the Huffman coding. Declaration public void Encode(BinaryWriter output, byte[] data, int off, int len) Parameters Type Name Description BinaryWriter output the output stream for the compressed data Byte [] data the string literal to be Huffman encoded Int32 off the start offset in the data Int32 len the number of bytes to encode Exceptions Type Condition IOException if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed. | Improve this Doc View Source GetEncodedLength(Byte[]) Returns the number of bytes required to Huffman encode the input string literal. Declaration public int GetEncodedLength(byte[] data) Parameters Type Name Description Byte [] data the string literal to be Huffman encoded Returns Type Description Int32 the number of bytes required to Huffman encode data"
},
"api/Titanium.Web.Proxy.Http2.Hpack.IHeaderListener.html": {
"href": "api/Titanium.Web.Proxy.Http2.Hpack.IHeaderListener.html",
@@ -212,17 +212,17 @@
"api/Titanium.Web.Proxy.Http2.Hpack.StaticTable.html": {
"href": "api/Titanium.Web.Proxy.Http2.Hpack.StaticTable.html",
"title": "Class StaticTable | Titanium Web Proxy",
- "keywords": "Class StaticTable Inheritance Object StaticTable 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.Http2.Hpack Assembly : Titanium.Web.Proxy.dll Syntax public static class StaticTable Properties | Improve this Doc View Source Length The number of header fields in the static table. Declaration public static int Length { get; } Property Value Type Description Int32 The length. Methods | Improve this Doc View Source Get(Int32) Return the http header field at the given index value. Declaration public static HttpHeader Get(int index) Parameters Type Name Description Int32 index Index. Returns Type Description HttpHeader The header field. | Improve this Doc View Source GetIndex(String) Returns the lowest index value for the given header field name in the static table. Returns -1 if the header field name is not in the static table. Declaration public static int GetIndex(string name) Parameters Type Name Description String name Name. Returns Type Description Int32 The index. | Improve this Doc View Source GetIndex(String, String) Returns the index value for the given header field in the static table. Returns -1 if the header field is not in the static table. Declaration public static int GetIndex(string name, string value) Parameters Type Name Description String name Name. String value Value. Returns Type Description Int32 The index."
+ "keywords": "Class StaticTable Inheritance Object StaticTable Inherited Members Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Object.ToString() Namespace : Titanium.Web.Proxy.Http2.Hpack Assembly : Titanium.Web.Proxy.dll Syntax public static class StaticTable Properties | Improve this Doc View Source Length The number of header fields in the static table. Declaration public static int Length { get; } Property Value Type Description Int32 The length. Methods | Improve this Doc View Source Get(Int32) Return the http header field at the given index value. Declaration public static HttpHeader Get(int index) Parameters Type Name Description Int32 index Index. Returns Type Description HttpHeader The header field. | Improve this Doc View Source GetIndex(String) Returns the lowest index value for the given header field name in the static table. Returns -1 if the header field name is not in the static table. Declaration public static int GetIndex(string name) Parameters Type Name Description String name Name. Returns Type Description Int32 The index. | Improve this Doc View Source GetIndex(String, String) Returns the index value for the given header field in the static table. Returns -1 if the header field is not in the static table. Declaration public static int GetIndex(string name, string value) Parameters Type Name Description String name Name. String value Value. Returns Type Description Int32 The index."
},
"api/Titanium.Web.Proxy.Models.ExplicitProxyEndPoint.html": {
"href": "api/Titanium.Web.Proxy.Models.ExplicitProxyEndPoint.html",
"title": "Class ExplicitProxyEndPoint | Titanium Web Proxy",
- "keywords": "Class ExplicitProxyEndPoint A proxy endpoint that the client is aware of. So client application know that it is communicating with a proxy server. Inheritance Object ProxyEndPoint ExplicitProxyEndPoint Inherited Members ProxyEndPoint.IpAddress ProxyEndPoint.Port ProxyEndPoint.DecryptSsl ProxyEndPoint.IpV6Enabled ProxyEndPoint.GenericCertificate Object.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.Models Assembly : Titanium.Web.Proxy.dll Syntax public class ExplicitProxyEndPoint : ProxyEndPoint Constructors | Improve this Doc View Source ExplicitProxyEndPoint(IPAddress, Int32, Boolean) Constructor. Declaration public ExplicitProxyEndPoint(IPAddress ipAddress, int port, bool decryptSsl = true) Parameters Type Name Description IPAddress ipAddress Listening IP address. Int32 port Listening port. Boolean decryptSsl Should we decrypt ssl? Events | Improve this Doc View Source BeforeTunnelConnectRequest Intercept tunnel connect request. Valid only for explicit endpoints. Set the DecryptSsl property to false if this HTTP connect request shouldn't be decrypted and instead be relayed. Declaration public event AsyncEventHandler BeforeTunnelConnectRequest Event Type Type Description AsyncEventHandler < TunnelConnectSessionEventArgs > | Improve this Doc View Source BeforeTunnelConnectResponse Intercept tunnel connect response. Valid only for explicit endpoints. Declaration public event AsyncEventHandler BeforeTunnelConnectResponse Event Type Type Description AsyncEventHandler < TunnelConnectSessionEventArgs >"
+ "keywords": "Class ExplicitProxyEndPoint A proxy endpoint that the client is aware of. So client application know that it is communicating with a proxy server. Inheritance Object ProxyEndPoint ExplicitProxyEndPoint Inherited Members ProxyEndPoint.IpAddress ProxyEndPoint.Port ProxyEndPoint.DecryptSsl ProxyEndPoint.IpV6Enabled ProxyEndPoint.GenericCertificate Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Object.ToString() Namespace : Titanium.Web.Proxy.Models Assembly : Titanium.Web.Proxy.dll Syntax public class ExplicitProxyEndPoint : ProxyEndPoint Constructors | Improve this Doc View Source ExplicitProxyEndPoint(IPAddress, Int32, Boolean) Constructor. Declaration public ExplicitProxyEndPoint(IPAddress ipAddress, int port, bool decryptSsl = true) Parameters Type Name Description IPAddress ipAddress Listening IP address. Int32 port Listening port. Boolean decryptSsl Should we decrypt ssl? Events | Improve this Doc View Source BeforeTunnelConnectRequest Intercept tunnel connect request. Valid only for explicit endpoints. Set the DecryptSsl property to false if this HTTP connect request shouldn't be decrypted and instead be relayed. Declaration public event AsyncEventHandler BeforeTunnelConnectRequest Event Type Type Description AsyncEventHandler < TunnelConnectSessionEventArgs > | Improve this Doc View Source BeforeTunnelConnectResponse Intercept tunnel connect response. Valid only for explicit endpoints. Declaration public event AsyncEventHandler BeforeTunnelConnectResponse Event Type Type Description AsyncEventHandler < TunnelConnectSessionEventArgs >"
},
"api/Titanium.Web.Proxy.Models.ExternalProxy.html": {
"href": "api/Titanium.Web.Proxy.Models.ExternalProxy.html",
"title": "Class ExternalProxy | Titanium Web Proxy",
- "keywords": "Class ExternalProxy An upstream proxy this proxy uses if any. Inheritance Object ExternalProxy Inherited Members Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.Models Assembly : Titanium.Web.Proxy.dll Syntax public class ExternalProxy Properties | Improve this Doc View Source BypassLocalhost Bypass this proxy for connections to localhost? Declaration public bool BypassLocalhost { get; set; } Property Value Type Description Boolean | Improve this Doc View Source HostName Host name. Declaration public string HostName { get; set; } Property Value Type Description String | Improve this Doc View Source Password Password. Declaration public string Password { get; set; } Property Value Type Description String | Improve this Doc View Source Port Port. Declaration public int Port { get; set; } Property Value Type Description Int32 | Improve this Doc View Source UseDefaultCredentials Use default windows credentials? Declaration public bool UseDefaultCredentials { get; set; } Property Value Type Description Boolean | Improve this Doc View Source UserName Username. Declaration public string UserName { get; set; } Property Value Type Description String Methods | Improve this Doc View Source ToString() returns data in Hostname:port format. Declaration public override string ToString() Returns Type Description String Overrides Object.ToString()"
+ "keywords": "Class ExternalProxy An upstream proxy this proxy uses if any. Inheritance Object ExternalProxy Inherited Members Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Namespace : Titanium.Web.Proxy.Models Assembly : Titanium.Web.Proxy.dll Syntax public class ExternalProxy Properties | Improve this Doc View Source BypassLocalhost Bypass this proxy for connections to localhost? Declaration public bool BypassLocalhost { get; set; } Property Value Type Description Boolean | Improve this Doc View Source HostName Host name. Declaration public string HostName { get; set; } Property Value Type Description String | Improve this Doc View Source Password Password. Declaration public string Password { get; set; } Property Value Type Description String | Improve this Doc View Source Port Port. Declaration public int Port { get; set; } Property Value Type Description Int32 | Improve this Doc View Source UseDefaultCredentials Use default windows credentials? Declaration public bool UseDefaultCredentials { get; set; } Property Value Type Description Boolean | Improve this Doc View Source UserName Username. Declaration public string UserName { get; set; } Property Value Type Description String Methods | Improve this Doc View Source ToString() returns data in Hostname:port format. Declaration public override string ToString() Returns Type Description String Overrides Object.ToString()"
},
"api/Titanium.Web.Proxy.Models.html": {
"href": "api/Titanium.Web.Proxy.Models.html",
@@ -232,12 +232,12 @@
"api/Titanium.Web.Proxy.Models.HttpHeader.html": {
"href": "api/Titanium.Web.Proxy.Models.HttpHeader.html",
"title": "Class HttpHeader | Titanium Web Proxy",
- "keywords": "Class HttpHeader Http Header object used by proxy Inheritance Object HttpHeader Inherited Members Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.Models Assembly : Titanium.Web.Proxy.dll Syntax public class HttpHeader Constructors | Improve this Doc View Source HttpHeader(String, String) Initialize a new instance. Declaration public HttpHeader(string name, string value) Parameters Type Name Description String name Header name. String value Header value. | Improve this Doc View Source HttpHeader(String, String, Boolean) Declaration protected HttpHeader(string name, string value, bool headerEntry) Parameters Type Name Description String name String value Boolean headerEntry Fields | Improve this Doc View Source HttpHeaderOverhead HPACK: Header Compression for HTTP/2 Section 4.1. Calculating Table Size The additional 32 octets account for an estimated overhead associated with an entry. Declaration public const int HttpHeaderOverhead = 32 Field Value Type Description Int32 Properties | Improve this Doc View Source Name Header Name. Declaration public string Name { get; } Property Value Type Description String | Improve this Doc View Source Size Declaration public int Size { get; } Property Value Type Description Int32 | Improve this Doc View Source Value Header Value. Declaration public string Value { get; set; } Property Value Type Description String Methods | Improve this Doc View Source SizeOf(String, String) Declaration public static int SizeOf(string name, string value) Parameters Type Name Description String name String value Returns Type Description Int32 | Improve this Doc View Source ToString() Returns header as a valid header string. Declaration public override string ToString() Returns Type Description String Overrides Object.ToString()"
+ "keywords": "Class HttpHeader Http Header object used by proxy Inheritance Object HttpHeader Inherited Members Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Namespace : Titanium.Web.Proxy.Models Assembly : Titanium.Web.Proxy.dll Syntax public class HttpHeader Constructors | Improve this Doc View Source HttpHeader(String, String) Initialize a new instance. Declaration public HttpHeader(string name, string value) Parameters Type Name Description String name Header name. String value Header value. | Improve this Doc View Source HttpHeader(String, String, Boolean) Declaration protected HttpHeader(string name, string value, bool headerEntry) Parameters Type Name Description String name String value Boolean headerEntry Fields | Improve this Doc View Source HttpHeaderOverhead HPACK: Header Compression for HTTP/2 Section 4.1. Calculating Table Size The additional 32 octets account for an estimated overhead associated with an entry. Declaration public const int HttpHeaderOverhead = 32 Field Value Type Description Int32 Properties | Improve this Doc View Source Name Header Name. Declaration public string Name { get; } Property Value Type Description String | Improve this Doc View Source Size Declaration public int Size { get; } Property Value Type Description Int32 | Improve this Doc View Source Value Header Value. Declaration public string Value { get; set; } Property Value Type Description String Methods | Improve this Doc View Source SizeOf(String, String) Declaration public static int SizeOf(string name, string value) Parameters Type Name Description String name String value Returns Type Description Int32 | Improve this Doc View Source ToString() Returns header as a valid header string. Declaration public override string ToString() Returns Type Description String Overrides Object.ToString()"
},
"api/Titanium.Web.Proxy.Models.ProxyAuthenticationContext.html": {
"href": "api/Titanium.Web.Proxy.Models.ProxyAuthenticationContext.html",
"title": "Class ProxyAuthenticationContext | Titanium Web Proxy",
- "keywords": "Class ProxyAuthenticationContext A context container for authentication flows Inheritance Object ProxyAuthenticationContext 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.Models Assembly : Titanium.Web.Proxy.dll Syntax public class ProxyAuthenticationContext Properties | Improve this Doc View Source Continuation An optional continuation token to return to the caller if set Declaration public string Continuation { get; set; } Property Value Type Description String | Improve this Doc View Source Result The result of the current authentication request Declaration public ProxyAuthenticationResult Result { get; set; } Property Value Type Description ProxyAuthenticationResult Methods | Improve this Doc View Source Failed() Declaration public static ProxyAuthenticationContext Failed() Returns Type Description ProxyAuthenticationContext | Improve this Doc View Source Succeeded() Declaration public static ProxyAuthenticationContext Succeeded() Returns Type Description ProxyAuthenticationContext"
+ "keywords": "Class ProxyAuthenticationContext A context container for authentication flows Inheritance Object ProxyAuthenticationContext Inherited Members Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Object.ToString() Namespace : Titanium.Web.Proxy.Models Assembly : Titanium.Web.Proxy.dll Syntax public class ProxyAuthenticationContext Properties | Improve this Doc View Source Continuation An optional continuation token to return to the caller if set Declaration public string Continuation { get; set; } Property Value Type Description String | Improve this Doc View Source Result The result of the current authentication request Declaration public ProxyAuthenticationResult Result { get; set; } Property Value Type Description ProxyAuthenticationResult Methods | Improve this Doc View Source Failed() Declaration public static ProxyAuthenticationContext Failed() Returns Type Description ProxyAuthenticationContext | Improve this Doc View Source Succeeded() Declaration public static ProxyAuthenticationContext Succeeded() Returns Type Description ProxyAuthenticationContext"
},
"api/Titanium.Web.Proxy.Models.ProxyAuthenticationResult.html": {
"href": "api/Titanium.Web.Proxy.Models.ProxyAuthenticationResult.html",
@@ -247,7 +247,7 @@
"api/Titanium.Web.Proxy.Models.ProxyEndPoint.html": {
"href": "api/Titanium.Web.Proxy.Models.ProxyEndPoint.html",
"title": "Class ProxyEndPoint | Titanium Web Proxy",
- "keywords": "Class ProxyEndPoint An abstract endpoint where the proxy listens Inheritance Object ProxyEndPoint ExplicitProxyEndPoint TransparentProxyEndPoint 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.Models Assembly : Titanium.Web.Proxy.dll Syntax public abstract class ProxyEndPoint Constructors | Improve this Doc View Source ProxyEndPoint(IPAddress, Int32, Boolean) Constructor. Declaration protected ProxyEndPoint(IPAddress ipAddress, int port, bool decryptSsl) Parameters Type Name Description IPAddress ipAddress Int32 port Boolean decryptSsl Properties | Improve this Doc View Source DecryptSsl Enable SSL? Declaration public bool DecryptSsl { get; } Property Value Type Description Boolean | Improve this Doc View Source GenericCertificate Generic certificate to use for SSL decryption. Declaration public X509Certificate2 GenericCertificate { get; set; } Property Value Type Description X509Certificate2 | Improve this Doc View Source IpAddress Ip Address we are listening. Declaration public IPAddress IpAddress { get; } Property Value Type Description IPAddress | Improve this Doc View Source IpV6Enabled Is IPv6 enabled? Declaration public bool IpV6Enabled { get; } Property Value Type Description Boolean | Improve this Doc View Source Port Port we are listening. Declaration public int Port { get; } Property Value Type Description Int32"
+ "keywords": "Class ProxyEndPoint An abstract endpoint where the proxy listens Inheritance Object ProxyEndPoint ExplicitProxyEndPoint TransparentProxyEndPoint Inherited Members Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Object.ToString() Namespace : Titanium.Web.Proxy.Models Assembly : Titanium.Web.Proxy.dll Syntax public abstract class ProxyEndPoint Constructors | Improve this Doc View Source ProxyEndPoint(IPAddress, Int32, Boolean) Constructor. Declaration protected ProxyEndPoint(IPAddress ipAddress, int port, bool decryptSsl) Parameters Type Name Description IPAddress ipAddress Int32 port Boolean decryptSsl Properties | Improve this Doc View Source DecryptSsl Enable SSL? Declaration public bool DecryptSsl { get; } Property Value Type Description Boolean | Improve this Doc View Source GenericCertificate Generic certificate to use for SSL decryption. Declaration public X509Certificate2 GenericCertificate { get; set; } Property Value Type Description X509Certificate2 | Improve this Doc View Source IpAddress Ip Address we are listening. Declaration public IPAddress IpAddress { get; } Property Value Type Description IPAddress | Improve this Doc View Source IpV6Enabled Is IPv6 enabled? Declaration public bool IpV6Enabled { get; } Property Value Type Description Boolean | Improve this Doc View Source Port Port we are listening. Declaration public int Port { get; } Property Value Type Description Int32"
},
"api/Titanium.Web.Proxy.Models.ProxyProtocolType.html": {
"href": "api/Titanium.Web.Proxy.Models.ProxyProtocolType.html",
@@ -257,7 +257,7 @@
"api/Titanium.Web.Proxy.Models.TransparentProxyEndPoint.html": {
"href": "api/Titanium.Web.Proxy.Models.TransparentProxyEndPoint.html",
"title": "Class TransparentProxyEndPoint | Titanium Web Proxy",
- "keywords": "Class TransparentProxyEndPoint A proxy end point client is not aware of. Useful when requests are redirected to this proxy end point through port forwarding via router. Inheritance Object ProxyEndPoint TransparentProxyEndPoint Inherited Members ProxyEndPoint.IpAddress ProxyEndPoint.Port ProxyEndPoint.DecryptSsl ProxyEndPoint.IpV6Enabled ProxyEndPoint.GenericCertificate Object.ToString() Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.Models Assembly : Titanium.Web.Proxy.dll Syntax public class TransparentProxyEndPoint : ProxyEndPoint Constructors | Improve this Doc View Source TransparentProxyEndPoint(IPAddress, Int32, Boolean) Initialize a new instance. Declaration public TransparentProxyEndPoint(IPAddress ipAddress, int port, bool decryptSsl = true) Parameters Type Name Description IPAddress ipAddress Listening Ip address. Int32 port Listening port. Boolean decryptSsl Should we decrypt ssl? Properties | Improve this Doc View Source GenericCertificateName 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. Declaration public string GenericCertificateName { get; set; } Property Value Type Description String Events | Improve this Doc View Source BeforeSslAuthenticate Before Ssl authentication this event is fired. Declaration public event AsyncEventHandler BeforeSslAuthenticate Event Type Type Description AsyncEventHandler < BeforeSslAuthenticateEventArgs >"
+ "keywords": "Class TransparentProxyEndPoint A proxy end point client is not aware of. Useful when requests are redirected to this proxy end point through port forwarding via router. Inheritance Object ProxyEndPoint TransparentProxyEndPoint Inherited Members ProxyEndPoint.IpAddress ProxyEndPoint.Port ProxyEndPoint.DecryptSsl ProxyEndPoint.IpV6Enabled ProxyEndPoint.GenericCertificate Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Object.ToString() Namespace : Titanium.Web.Proxy.Models Assembly : Titanium.Web.Proxy.dll Syntax public class TransparentProxyEndPoint : ProxyEndPoint Constructors | Improve this Doc View Source TransparentProxyEndPoint(IPAddress, Int32, Boolean) Initialize a new instance. Declaration public TransparentProxyEndPoint(IPAddress ipAddress, int port, bool decryptSsl = true) Parameters Type Name Description IPAddress ipAddress Listening Ip address. Int32 port Listening port. Boolean decryptSsl Should we decrypt ssl? Properties | Improve this Doc View Source GenericCertificateName 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. Declaration public string GenericCertificateName { get; set; } Property Value Type Description String Events | Improve this Doc View Source BeforeSslAuthenticate Before Ssl authentication this event is fired. Declaration public event AsyncEventHandler BeforeSslAuthenticate Event Type Type Description AsyncEventHandler < BeforeSslAuthenticateEventArgs >"
},
"api/Titanium.Web.Proxy.Network.CertificateEngine.html": {
"href": "api/Titanium.Web.Proxy.Network.CertificateEngine.html",
@@ -267,7 +267,7 @@
"api/Titanium.Web.Proxy.Network.CertificateManager.html": {
"href": "api/Titanium.Web.Proxy.Network.CertificateManager.html",
"title": "Class CertificateManager | Titanium Web Proxy",
- "keywords": "Class CertificateManager A class to manage SSL certificates used by this proxy server. Inheritance Object CertificateManager 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.Network Assembly : Titanium.Web.Proxy.dll Syntax public sealed class CertificateManager : IDisposable Properties | Improve this Doc View Source CertificateCacheTimeOutMinutes Minutes certificates should be kept in cache when not used. Declaration public int CertificateCacheTimeOutMinutes { get; set; } Property Value Type Description Int32 | Improve this Doc View Source CertificateEngine Select Certificate Engine. Optionally set to BouncyCastle. Mono only support BouncyCastle and it is the default. Declaration public CertificateEngine CertificateEngine { get; set; } Property Value Type Description CertificateEngine | Improve this Doc View Source CertificateStorage The fake certificate cache storage. The default cache storage implementation saves certificates in folder \"crts\" (will be created in proxy dll directory). Implement ICertificateCache interface and assign concrete class here to customize. Declaration public ICertificateCache CertificateStorage { get; set; } Property Value Type Description ICertificateCache | Improve this Doc View Source OverwritePfxFile Overwrite Root certificate file. true : replace an existing .pfx file if password is incorrect or if RootCertificate = null. Declaration public bool OverwritePfxFile { get; set; } Property Value Type Description Boolean | Improve this Doc View Source PfxFilePath 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) Declaration public string PfxFilePath { get; set; } Property Value Type Description String | Improve this Doc View Source PfxPassword Password of the Root certificate file. Set a password for the .pfx file Declaration public string PfxPassword { get; set; } Property Value Type Description String | Improve this Doc View Source RootCertificate The root certificate. Declaration public X509Certificate2 RootCertificate { get; set; } Property Value Type Description X509Certificate2 | Improve this Doc View Source RootCertificateIssuerName Name of the root certificate issuer. (This is valid only when RootCertificate property is not set.) Declaration public string RootCertificateIssuerName { get; set; } Property Value Type Description String | Improve this Doc View Source RootCertificateName Name of the root certificate. (This is valid only when RootCertificate property is not set.) If no certificate is provided then a default Root Certificate will be created and used. The provided root certificate will be stored in proxy exe directory with the private key. Root certificate file will be named as \"rootCert.pfx\". Declaration public string RootCertificateName { get; set; } Property Value Type Description String | Improve this Doc View Source SaveFakeCertificates Save all fake certificates using CertificateStorage . for can load the certificate and not make new certificate every time. Declaration public bool SaveFakeCertificates { get; set; } Property Value Type Description Boolean | Improve this Doc View Source StorageFlag Adjust behaviour when certificates are saved to filesystem. Declaration public X509KeyStorageFlags StorageFlag { get; set; } Property Value Type Description X509KeyStorageFlags Methods | Improve this Doc View Source ClearRootCertificate() Clear the root certificate and cache. Declaration public void ClearRootCertificate() | Improve this Doc View Source CreateRootCertificate(Boolean) Attempts to create a RootCertificate. Declaration public bool CreateRootCertificate(bool persistToFile = true) Parameters Type Name Description Boolean persistToFile if set to true try to load/save the certificate from rootCert.pfx. Returns Type Description Boolean true if succeeded, else false. | Improve this Doc View Source CreateServerCertificate(String) Creates a server certificate signed by the root certificate. Declaration public Task CreateServerCertificate(string certificateName) Parameters Type Name Description String certificateName Returns Type Description Task < X509Certificate2 > | Improve this Doc View Source Dispose() Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Declaration public void Dispose() | Improve this Doc View Source EnsureRootCertificate() Ensure certificates are setup (creates root if required). Also makes root certificate trusted based on initial setup from proxy constructor for user/machine trust. Declaration public void EnsureRootCertificate() | Improve this Doc View Source EnsureRootCertificate(Boolean, Boolean, Boolean) Ensure 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. Declaration public void EnsureRootCertificate(bool userTrustRootCertificate, bool machineTrustRootCertificate, 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? | Improve this Doc View Source IsRootCertificateMachineTrusted() Determines whether the root certificate is machine trusted. Declaration public bool IsRootCertificateMachineTrusted() Returns Type Description Boolean | Improve this Doc View Source IsRootCertificateUserTrusted() Determines whether the root certificate is trusted. Declaration public bool IsRootCertificateUserTrusted() Returns Type Description Boolean | Improve this Doc View Source LoadRootCertificate() Loads root certificate from current executing assembly location with expected name rootCert.pfx. Declaration public X509Certificate2 LoadRootCertificate() Returns Type Description X509Certificate2 | Improve this Doc View Source LoadRootCertificate(String, String, Boolean, X509KeyStorageFlags) Manually load a Root certificate file from give path (.pfx file). Declaration public bool LoadRootCertificate(string pfxFilePath, string password, bool overwritePfXFile = true, X509KeyStorageFlags storageFlag = X509KeyStorageFlags.Exportable) Parameters Type Name Description String pfxFilePath 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). String password Set a password for the .pfx file. Boolean overwritePfXFile true : replace an existing .pfx file if password is incorrect or if RootCertificate==null. X509KeyStorageFlags storageFlag Returns Type Description Boolean true if succeeded, else false. | Improve this Doc View Source RemoveTrustedRootCertificate(Boolean) Removes the trusted certificates from user store, optionally also from machine store. To remove from machine store elevated permissions are required (will fail silently otherwise). Declaration public void RemoveTrustedRootCertificate(bool machineTrusted = false) Parameters Type Name Description Boolean machineTrusted Should also remove from machine store? | Improve this Doc View Source RemoveTrustedRootCertificateAsAdmin(Boolean) Removes the trusted certificates from user store, optionally also from machine store Declaration public bool RemoveTrustedRootCertificateAsAdmin(bool machineTrusted = false) Parameters Type Name Description Boolean machineTrusted Returns Type Description Boolean Should also remove from machine store? | Improve this Doc View Source TrustRootCertificate(Boolean) Trusts the root certificate in user store, optionally also in machine store. Machine trust would require elevated permissions (will silently fail otherwise). Declaration public void TrustRootCertificate(bool machineTrusted = false) Parameters Type Name Description Boolean machineTrusted | Improve this Doc View Source TrustRootCertificateAsAdmin(Boolean) Puts the certificate to the user store, optionally also to machine store. Prompts with UAC if elevated permissions are required. Works only on Windows. Declaration public bool TrustRootCertificateAsAdmin(bool machineTrusted = false) Parameters Type Name Description Boolean machineTrusted Returns Type Description Boolean True if success. Implements System.IDisposable"
+ "keywords": "Class CertificateManager A class to manage SSL certificates used by this proxy server. Inheritance Object CertificateManager Implements IDisposable Inherited Members Object.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Object.ToString() Namespace : Titanium.Web.Proxy.Network Assembly : Titanium.Web.Proxy.dll Syntax public sealed class CertificateManager : IDisposable Properties | Improve this Doc View Source CertificateCacheTimeOutMinutes Minutes certificates should be kept in cache when not used. Declaration public int CertificateCacheTimeOutMinutes { get; set; } Property Value Type Description Int32 | Improve this Doc View Source CertificateEngine Select Certificate Engine. Optionally set to BouncyCastle. Mono only support BouncyCastle and it is the default. Declaration public CertificateEngine CertificateEngine { get; set; } Property Value Type Description CertificateEngine | Improve this Doc View Source CertificateStorage The fake certificate cache storage. The default cache storage implementation saves certificates in folder \"crts\" (will be created in proxy dll directory). Implement ICertificateCache interface and assign concrete class here to customize. Declaration public ICertificateCache CertificateStorage { get; set; } Property Value Type Description ICertificateCache | Improve this Doc View Source OverwritePfxFile Overwrite Root certificate file. true : replace an existing .pfx file if password is incorrect or if RootCertificate = null. Declaration public bool OverwritePfxFile { get; set; } Property Value Type Description Boolean | Improve this Doc View Source PfxFilePath 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) Declaration public string PfxFilePath { get; set; } Property Value Type Description String | Improve this Doc View Source PfxPassword Password of the Root certificate file. Set a password for the .pfx file Declaration public string PfxPassword { get; set; } Property Value Type Description String | Improve this Doc View Source RootCertificate The root certificate. Declaration public X509Certificate2 RootCertificate { get; set; } Property Value Type Description X509Certificate2 | Improve this Doc View Source RootCertificateIssuerName Name of the root certificate issuer. (This is valid only when RootCertificate property is not set.) Declaration public string RootCertificateIssuerName { get; set; } Property Value Type Description String | Improve this Doc View Source RootCertificateName Name of the root certificate. (This is valid only when RootCertificate property is not set.) If no certificate is provided then a default Root Certificate will be created and used. The provided root certificate will be stored in proxy exe directory with the private key. Root certificate file will be named as \"rootCert.pfx\". Declaration public string RootCertificateName { get; set; } Property Value Type Description String | Improve this Doc View Source SaveFakeCertificates Save all fake certificates using CertificateStorage . for can load the certificate and not make new certificate every time. Declaration public bool SaveFakeCertificates { get; set; } Property Value Type Description Boolean | Improve this Doc View Source StorageFlag Adjust behaviour when certificates are saved to filesystem. Declaration public X509KeyStorageFlags StorageFlag { get; set; } Property Value Type Description X509KeyStorageFlags Methods | Improve this Doc View Source ClearRootCertificate() Clear the root certificate and cache. Declaration public void ClearRootCertificate() | Improve this Doc View Source CreateRootCertificate(Boolean) Attempts to create a RootCertificate. Declaration public bool CreateRootCertificate(bool persistToFile = true) Parameters Type Name Description Boolean persistToFile if set to true try to load/save the certificate from rootCert.pfx. Returns Type Description Boolean true if succeeded, else false. | Improve this Doc View Source CreateServerCertificate(String) Creates a server certificate signed by the root certificate. Declaration public Task CreateServerCertificate(string certificateName) Parameters Type Name Description String certificateName Returns Type Description Task < X509Certificate2 > | Improve this Doc View Source Dispose() Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Declaration public void Dispose() | Improve this Doc View Source EnsureRootCertificate() Ensure certificates are setup (creates root if required). Also makes root certificate trusted based on initial setup from proxy constructor for user/machine trust. Declaration public void EnsureRootCertificate() | Improve this Doc View Source EnsureRootCertificate(Boolean, Boolean, Boolean) Ensure 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. Declaration public void EnsureRootCertificate(bool userTrustRootCertificate, bool machineTrustRootCertificate, 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? | Improve this Doc View Source IsRootCertificateMachineTrusted() Determines whether the root certificate is machine trusted. Declaration public bool IsRootCertificateMachineTrusted() Returns Type Description Boolean | Improve this Doc View Source IsRootCertificateUserTrusted() Determines whether the root certificate is trusted. Declaration public bool IsRootCertificateUserTrusted() Returns Type Description Boolean | Improve this Doc View Source LoadRootCertificate() Loads root certificate from current executing assembly location with expected name rootCert.pfx. Declaration public X509Certificate2 LoadRootCertificate() Returns Type Description X509Certificate2 | Improve this Doc View Source LoadRootCertificate(String, String, Boolean, X509KeyStorageFlags) Manually load a Root certificate file from give path (.pfx file). Declaration public bool LoadRootCertificate(string pfxFilePath, string password, bool overwritePfXFile = true, X509KeyStorageFlags storageFlag = X509KeyStorageFlags.Exportable) Parameters Type Name Description String pfxFilePath 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). String password Set a password for the .pfx file. Boolean overwritePfXFile true : replace an existing .pfx file if password is incorrect or if RootCertificate==null. X509KeyStorageFlags storageFlag Returns Type Description Boolean true if succeeded, else false. | Improve this Doc View Source RemoveTrustedRootCertificate(Boolean) Removes the trusted certificates from user store, optionally also from machine store. To remove from machine store elevated permissions are required (will fail silently otherwise). Declaration public void RemoveTrustedRootCertificate(bool machineTrusted = false) Parameters Type Name Description Boolean machineTrusted Should also remove from machine store? | Improve this Doc View Source RemoveTrustedRootCertificateAsAdmin(Boolean) Removes the trusted certificates from user store, optionally also from machine store Declaration public bool RemoveTrustedRootCertificateAsAdmin(bool machineTrusted = false) Parameters Type Name Description Boolean machineTrusted Returns Type Description Boolean Should also remove from machine store? | Improve this Doc View Source TrustRootCertificate(Boolean) Trusts the root certificate in user store, optionally also in machine store. Machine trust would require elevated permissions (will silently fail otherwise). Declaration public void TrustRootCertificate(bool machineTrusted = false) Parameters Type Name Description Boolean machineTrusted | Improve this Doc View Source TrustRootCertificateAsAdmin(Boolean) Puts the certificate to the user store, optionally also to machine store. Prompts with UAC if elevated permissions are required. Works only on Windows. Declaration public bool TrustRootCertificateAsAdmin(bool machineTrusted = false) Parameters Type Name Description Boolean machineTrusted Returns Type Description Boolean True if success. Implements System.IDisposable"
},
"api/Titanium.Web.Proxy.Network.html": {
"href": "api/Titanium.Web.Proxy.Network.html",
@@ -277,6 +277,6 @@
"api/Titanium.Web.Proxy.ProxyServer.html": {
"href": "api/Titanium.Web.Proxy.ProxyServer.html",
"title": "Class ProxyServer | Titanium Web Proxy",
- "keywords": "Class ProxyServer This class 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 | Improve this Doc View Source 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? | Improve this Doc View Source 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 | Improve this Doc View Source BufferPool The buffer pool used throughout this proxy instance. Set custom implementations by implementing this interface. By default this uses DefaultBufferPool implementation available in StreamExtended library package. Declaration public IBufferPool BufferPool { get; set; } Property Value Type Description IBufferPool | Improve this Doc View Source BufferSize Buffer size in bytes used throughout this proxy. Default value is 8192 bytes. Declaration public int BufferSize { get; set; } Property Value Type Description Int32 | Improve this Doc View Source CertificateManager Manages certificates used by this proxy. Declaration public CertificateManager CertificateManager { get; } Property Value Type Description CertificateManager | Improve this Doc View Source CheckCertificateRevocation Should we check for certificate 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 | Improve this Doc View Source ClientConnectionCount Total number of active client connections. Declaration public int ClientConnectionCount { get; } Property Value Type Description Int32 | Improve this Doc View Source ConnectionTimeOutSeconds Seconds client/server connection are to be kept alive when waiting for read/write to complete. This will also determine the pool eviction time when connection pool is enabled. Default value is 60 seconds. Declaration public int ConnectionTimeOutSeconds { get; set; } Property Value Type Description Int32 | Improve this Doc View Source Enable100ContinueBehaviour Does this proxy uses the HTTP protocol 100 continue behaviour strictly? Broken 100 continue implementations on server/client may cause problems if enabled. Defaults to false. Declaration public bool Enable100ContinueBehaviour { get; set; } Property Value Type Description Boolean | Improve this Doc View Source EnableConnectionPool Should we enable experimental server connection pool? Defaults to true. Declaration public bool EnableConnectionPool { get; set; } Property Value Type Description Boolean | Improve this Doc View Source EnableHttp2 Enable disable HTTP/2 support. Warning: HTTP/2 support is very limited only enabled when both client and server supports it (no protocol changing in proxy) cannot modify the request/response (e.g header modifications in BeforeRequest/Response events are ignored) Declaration public bool EnableHttp2 { get; set; } Property Value Type Description Boolean | Improve this Doc View Source EnableTcpServerConnectionPrefetch 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. Declaration public bool EnableTcpServerConnectionPrefetch { get; set; } Property Value Type Description Boolean | Improve this Doc View Source 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. Defaults to false. Declaration public bool EnableWinAuth { get; set; } Property Value Type Description Boolean | Improve this Doc View Source ExceptionFunc Callback for error events in this proxy instance. Declaration public ExceptionHandler ExceptionFunc { get; set; } Property Value Type Description ExceptionHandler | Improve this Doc View Source ForwardToUpstreamGateway Gets or sets a value indicating whether requests will be chained to upstream gateway. Defaults to false. Declaration public bool ForwardToUpstreamGateway { get; set; } Property Value Type Description Boolean | Improve this Doc View Source 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> GetCustomUpStreamProxyFunc { get; set; } Property Value Type Description Func < SessionEventArgsBase , Task < ExternalProxy >> | Improve this Doc View Source MaxCachedConnections Maximum number of concurrent connections per remote host in cache. Only valid when connection pooling is enabled. Default value is 2. Declaration public int MaxCachedConnections { get; set; } Property Value Type Description Int32 | Improve this Doc View Source NoDelay Gets or sets a Boolean value that specifies whether server and client stream Sockets are using the Nagle algorithm. Defaults to true, no nagle algorithm is used. Declaration public bool NoDelay { get; set; } Property Value Type Description Boolean | Improve this Doc View Source ProxyAuthenticationRealm Realm used during Proxy Basic Authentication. Declaration public string ProxyAuthenticationRealm { get; set; } Property Value Type Description String | Improve this Doc View Source ProxyAuthenticationSchemes A collection of scheme types, e.g. basic, NTLM, Kerberos, Negotiate, to return if scheme authentication is required. Works in relation with ProxySchemeAuthenticateFunc. Declaration public IEnumerable ProxyAuthenticationSchemes { get; set; } Property Value Type Description IEnumerable < String > | Improve this Doc View Source ProxyBasicAuthenticateFunc A callback to authenticate proxy clients via basic authentication. Parameters are username and password as provided by client. Should return true for successful authentication. Declaration public Func> ProxyBasicAuthenticateFunc { get; set; } Property Value Type Description Func < SessionEventArgsBase , String , String , Task < Boolean >> | Improve this Doc View Source ProxyEndPoints A list of IpAddress and port this proxy is listening to. Declaration public List ProxyEndPoints { get; set; } Property Value Type Description List < ProxyEndPoint > | Improve this Doc View Source ProxyRunning Is the proxy currently running? Declaration public bool ProxyRunning { get; } Property Value Type Description Boolean | Improve this Doc View Source ProxySchemeAuthenticateFunc A pluggable callback to authenticate clients by scheme instead of requiring basic authentication through ProxyBasicAuthenticateFunc. Parameters are current working session, schemeType, and token as provided by a calling client. Should return success for successful authentication, continuation if the package requests, or failure. Declaration public Func> ProxySchemeAuthenticateFunc { get; set; } Property Value Type Description Func < SessionEventArgsBase , String , String , Task < ProxyAuthenticationContext >> | Improve this Doc View Source ReuseSocket Should we reuse client/server tcp sockets. Default is true (disabled for linux/macOS due to bug in .Net core). Declaration public bool ReuseSocket { get; set; } Property Value Type Description Boolean | Improve this Doc View Source ServerConnectionCount Total number of active server connections. Declaration public int ServerConnectionCount { get; } Property Value Type Description Int32 | Improve this Doc View Source SupportedSslProtocols List of supported Ssl versions. Declaration public SslProtocols SupportedSslProtocols { get; set; } Property Value Type Description SslProtocols | Improve this Doc View Source TcpTimeWaitSeconds Number of seconds to linger when Tcp connection is in TIME_WAIT state. Default value is 30. Declaration public int TcpTimeWaitSeconds { get; set; } Property Value Type Description Int32 | Improve this Doc View Source ThreadPoolWorkerThread Customize the minimum ThreadPool size (increase it on a server) Declaration public int ThreadPoolWorkerThread { get; set; } Property Value Type Description Int32 | Improve this Doc View Source 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 | Improve this Doc View Source UpStreamHttpProxy External proxy used for Http requests. Declaration public ExternalProxy UpStreamHttpProxy { get; set; } Property Value Type Description ExternalProxy | Improve this Doc View Source UpStreamHttpsProxy External proxy used for Https requests. Declaration public ExternalProxy UpStreamHttpsProxy { get; set; } Property Value Type Description ExternalProxy Methods | Improve this Doc View Source AddEndPoint(ProxyEndPoint) Add a proxy end point. Declaration public void AddEndPoint(ProxyEndPoint endPoint) Parameters Type Name Description ProxyEndPoint endPoint The proxy endpoint. | Improve this Doc View Source DisableAllSystemProxies() Clear all proxy settings for current machine. Declaration public void DisableAllSystemProxies() | Improve this Doc View Source DisableSystemHttpProxy() Clear HTTP proxy settings of current machine. Declaration public void DisableSystemHttpProxy() | Improve this Doc View Source DisableSystemHttpsProxy() Clear HTTPS proxy settings of current machine. Declaration public void DisableSystemHttpsProxy() | Improve this Doc View Source DisableSystemProxy(ProxyProtocolType) Clear the specified proxy setting for current machine. Declaration public void DisableSystemProxy(ProxyProtocolType protocolType) Parameters Type Name Description ProxyProtocolType protocolType | Improve this Doc View Source Dispose() Dispose the Proxy instance. Declaration public void Dispose() | Improve this Doc View Source RemoveEndPoint(ProxyEndPoint) Remove a proxy end point. Will throw error if the end point doesn't exist. Declaration public void RemoveEndPoint(ProxyEndPoint endPoint) Parameters Type Name Description ProxyEndPoint endPoint The existing endpoint to remove. | Improve this Doc View Source 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 The explicit endpoint. | Improve this Doc View Source 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 The explicit endpoint. | Improve this Doc View Source 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 The explicit endpoint. ProxyProtocolType protocolType The proxy protocol type. | Improve this Doc View Source Start() Start this proxy server instance. Declaration public void Start() | Improve this Doc View Source Stop() Stop this proxy server instance. Declaration public void Stop() Events | Improve this Doc View Source AfterResponse Intercept after response event from server. Declaration public event AsyncEventHandler AfterResponse Event Type Type Description AsyncEventHandler < SessionEventArgs > | Improve this Doc View Source BeforeRequest Intercept request event to server. Declaration public event AsyncEventHandler BeforeRequest Event Type Type Description AsyncEventHandler < SessionEventArgs > | Improve this Doc View Source BeforeResponse Intercept response event from server. Declaration public event AsyncEventHandler BeforeResponse Event Type Type Description AsyncEventHandler < SessionEventArgs > | Improve this Doc View Source ClientCertificateSelectionCallback Event to override client certificate selection during mutual SSL authentication. Declaration public event AsyncEventHandler ClientCertificateSelectionCallback Event Type Type Description AsyncEventHandler < CertificateSelectionEventArgs > | Improve this Doc View Source ClientConnectionCountChanged Event occurs when client connection count changed. Declaration public event EventHandler ClientConnectionCountChanged Event Type Type Description EventHandler | Improve this Doc View Source OnClientConnectionCreate Customize TcpClient used for client connection upon create. Declaration public event AsyncEventHandler OnClientConnectionCreate Event Type Type Description AsyncEventHandler < TcpClient > | Improve this Doc View Source OnServerConnectionCreate Customize TcpClient used for server connection upon create. Declaration public event AsyncEventHandler OnServerConnectionCreate Event Type Type Description AsyncEventHandler < TcpClient > | Improve this Doc View Source ServerCertificateValidationCallback Event to override the default verification logic of remote SSL certificate received during authentication. Declaration public event AsyncEventHandler ServerCertificateValidationCallback Event Type Type Description AsyncEventHandler < CertificateValidationEventArgs > | Improve this Doc View Source ServerConnectionCountChanged Event occurs when server connection count changed. Declaration public event EventHandler ServerConnectionCountChanged Event Type Type Description EventHandler Implements System.IDisposable"
+ "keywords": "Class ProxyServer This class 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.Equals(Object) Object.Equals(Object, Object) Object.GetHashCode() Object.GetType() Object.MemberwiseClone() Object.ReferenceEquals(Object, Object) Object.ToString() Namespace : Titanium.Web.Proxy Assembly : Titanium.Web.Proxy.dll Syntax public class ProxyServer : IDisposable Constructors | Improve this Doc View Source 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? | Improve this Doc View Source 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 | Improve this Doc View Source BufferPool The buffer pool used throughout this proxy instance. Set custom implementations by implementing this interface. By default this uses DefaultBufferPool implementation available in StreamExtended library package. Declaration public IBufferPool BufferPool { get; set; } Property Value Type Description IBufferPool | Improve this Doc View Source BufferSize Buffer size in bytes used throughout this proxy. Default value is 8192 bytes. Declaration public int BufferSize { get; set; } Property Value Type Description Int32 | Improve this Doc View Source CertificateManager Manages certificates used by this proxy. Declaration public CertificateManager CertificateManager { get; } Property Value Type Description CertificateManager | Improve this Doc View Source CheckCertificateRevocation Should we check for certificate 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 | Improve this Doc View Source ClientConnectionCount Total number of active client connections. Declaration public int ClientConnectionCount { get; } Property Value Type Description Int32 | Improve this Doc View Source ConnectionTimeOutSeconds Seconds client/server connection are to be kept alive when waiting for read/write to complete. This will also determine the pool eviction time when connection pool is enabled. Default value is 60 seconds. Declaration public int ConnectionTimeOutSeconds { get; set; } Property Value Type Description Int32 | Improve this Doc View Source Enable100ContinueBehaviour Does this proxy uses the HTTP protocol 100 continue behaviour strictly? Broken 100 continue implementations on server/client may cause problems if enabled. Defaults to false. Declaration public bool Enable100ContinueBehaviour { get; set; } Property Value Type Description Boolean | Improve this Doc View Source EnableConnectionPool Should we enable experimental server connection pool? Defaults to true. Declaration public bool EnableConnectionPool { get; set; } Property Value Type Description Boolean | Improve this Doc View Source EnableHttp2 Enable disable HTTP/2 support. Warning: HTTP/2 support is very limited only enabled when both client and server supports it (no protocol changing in proxy) cannot modify the request/response (e.g header modifications in BeforeRequest/Response events are ignored) Declaration public bool EnableHttp2 { get; set; } Property Value Type Description Boolean | Improve this Doc View Source EnableTcpServerConnectionPrefetch 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. Declaration public bool EnableTcpServerConnectionPrefetch { get; set; } Property Value Type Description Boolean | Improve this Doc View Source 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. Defaults to false. Declaration public bool EnableWinAuth { get; set; } Property Value Type Description Boolean | Improve this Doc View Source ExceptionFunc Callback for error events in this proxy instance. Declaration public ExceptionHandler ExceptionFunc { get; set; } Property Value Type Description ExceptionHandler | Improve this Doc View Source ForwardToUpstreamGateway Gets or sets a value indicating whether requests will be chained to upstream gateway. Defaults to false. Declaration public bool ForwardToUpstreamGateway { get; set; } Property Value Type Description Boolean | Improve this Doc View Source 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> GetCustomUpStreamProxyFunc { get; set; } Property Value Type Description Func < SessionEventArgsBase , Task < ExternalProxy >> | Improve this Doc View Source MaxCachedConnections Maximum number of concurrent connections per remote host in cache. Only valid when connection pooling is enabled. Default value is 2. Declaration public int MaxCachedConnections { get; set; } Property Value Type Description Int32 | Improve this Doc View Source NoDelay Gets or sets a Boolean value that specifies whether server and client stream Sockets are using the Nagle algorithm. Defaults to true, no nagle algorithm is used. Declaration public bool NoDelay { get; set; } Property Value Type Description Boolean | Improve this Doc View Source ProxyAuthenticationRealm Realm used during Proxy Basic Authentication. Declaration public string ProxyAuthenticationRealm { get; set; } Property Value Type Description String | Improve this Doc View Source ProxyAuthenticationSchemes A collection of scheme types, e.g. basic, NTLM, Kerberos, Negotiate, to return if scheme authentication is required. Works in relation with ProxySchemeAuthenticateFunc. Declaration public IEnumerable ProxyAuthenticationSchemes { get; set; } Property Value Type Description IEnumerable < String > | Improve this Doc View Source ProxyBasicAuthenticateFunc A callback to authenticate proxy clients via basic authentication. Parameters are username and password as provided by client. Should return true for successful authentication. Declaration public Func> ProxyBasicAuthenticateFunc { get; set; } Property Value Type Description Func < SessionEventArgsBase , String , String , Task < Boolean >> | Improve this Doc View Source ProxyEndPoints A list of IpAddress and port this proxy is listening to. Declaration public List ProxyEndPoints { get; set; } Property Value Type Description List < ProxyEndPoint > | Improve this Doc View Source ProxyRunning Is the proxy currently running? Declaration public bool ProxyRunning { get; } Property Value Type Description Boolean | Improve this Doc View Source ProxySchemeAuthenticateFunc A pluggable callback to authenticate clients by scheme instead of requiring basic authentication through ProxyBasicAuthenticateFunc. Parameters are current working session, schemeType, and token as provided by a calling client. Should return success for successful authentication, continuation if the package requests, or failure. Declaration public Func> ProxySchemeAuthenticateFunc { get; set; } Property Value Type Description Func < SessionEventArgsBase , String , String , Task < ProxyAuthenticationContext >> | Improve this Doc View Source ReuseSocket Should we reuse client/server tcp sockets. Default is true (disabled for linux/macOS due to bug in .Net core). Declaration public bool ReuseSocket { get; set; } Property Value Type Description Boolean | Improve this Doc View Source ServerConnectionCount Total number of active server connections. Declaration public int ServerConnectionCount { get; } Property Value Type Description Int32 | Improve this Doc View Source SupportedSslProtocols List of supported Ssl versions. Declaration public SslProtocols SupportedSslProtocols { get; set; } Property Value Type Description SslProtocols | Improve this Doc View Source TcpTimeWaitSeconds Number of seconds to linger when Tcp connection is in TIME_WAIT state. Default value is 30. Declaration public int TcpTimeWaitSeconds { get; set; } Property Value Type Description Int32 | Improve this Doc View Source ThreadPoolWorkerThread Customize the minimum ThreadPool size (increase it on a server) Declaration public int ThreadPoolWorkerThread { get; set; } Property Value Type Description Int32 | Improve this Doc View Source 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 | Improve this Doc View Source UpStreamHttpProxy External proxy used for Http requests. Declaration public ExternalProxy UpStreamHttpProxy { get; set; } Property Value Type Description ExternalProxy | Improve this Doc View Source UpStreamHttpsProxy External proxy used for Https requests. Declaration public ExternalProxy UpStreamHttpsProxy { get; set; } Property Value Type Description ExternalProxy Methods | Improve this Doc View Source AddEndPoint(ProxyEndPoint) Add a proxy end point. Declaration public void AddEndPoint(ProxyEndPoint endPoint) Parameters Type Name Description ProxyEndPoint endPoint The proxy endpoint. | Improve this Doc View Source DisableAllSystemProxies() Clear all proxy settings for current machine. Declaration public void DisableAllSystemProxies() | Improve this Doc View Source DisableSystemHttpProxy() Clear HTTP proxy settings of current machine. Declaration public void DisableSystemHttpProxy() | Improve this Doc View Source DisableSystemHttpsProxy() Clear HTTPS proxy settings of current machine. Declaration public void DisableSystemHttpsProxy() | Improve this Doc View Source DisableSystemProxy(ProxyProtocolType) Clear the specified proxy setting for current machine. Declaration public void DisableSystemProxy(ProxyProtocolType protocolType) Parameters Type Name Description ProxyProtocolType protocolType | Improve this Doc View Source Dispose() Dispose the Proxy instance. Declaration public void Dispose() | Improve this Doc View Source RemoveEndPoint(ProxyEndPoint) Remove a proxy end point. Will throw error if the end point doesn't exist. Declaration public void RemoveEndPoint(ProxyEndPoint endPoint) Parameters Type Name Description ProxyEndPoint endPoint The existing endpoint to remove. | Improve this Doc View Source RestoreOriginalProxySettings() Restores the original proxy settings. Declaration public void RestoreOriginalProxySettings() | Improve this Doc View Source 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 The explicit endpoint. | Improve this Doc View Source 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 The explicit endpoint. | Improve this Doc View Source 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 The explicit endpoint. ProxyProtocolType protocolType The proxy protocol type. | Improve this Doc View Source Start() Start this proxy server instance. Declaration public void Start() | Improve this Doc View Source Stop() Stop this proxy server instance. Declaration public void Stop() Events | Improve this Doc View Source AfterResponse Intercept after response event from server. Declaration public event AsyncEventHandler AfterResponse Event Type Type Description AsyncEventHandler < SessionEventArgs > | Improve this Doc View Source BeforeRequest Intercept request event to server. Declaration public event AsyncEventHandler BeforeRequest Event Type Type Description AsyncEventHandler < SessionEventArgs > | Improve this Doc View Source BeforeResponse Intercept response event from server. Declaration public event AsyncEventHandler BeforeResponse Event Type Type Description AsyncEventHandler < SessionEventArgs > | Improve this Doc View Source ClientCertificateSelectionCallback Event to override client certificate selection during mutual SSL authentication. Declaration public event AsyncEventHandler ClientCertificateSelectionCallback Event Type Type Description AsyncEventHandler < CertificateSelectionEventArgs > | Improve this Doc View Source ClientConnectionCountChanged Event occurs when client connection count changed. Declaration public event EventHandler ClientConnectionCountChanged Event Type Type Description EventHandler | Improve this Doc View Source OnClientConnectionCreate Customize TcpClient used for client connection upon create. Declaration public event AsyncEventHandler OnClientConnectionCreate Event Type Type Description AsyncEventHandler < TcpClient > | Improve this Doc View Source OnServerConnectionCreate Customize TcpClient used for server connection upon create. Declaration public event AsyncEventHandler OnServerConnectionCreate Event Type Type Description AsyncEventHandler < TcpClient > | Improve this Doc View Source ServerCertificateValidationCallback Event to override the default verification logic of remote SSL certificate received during authentication. Declaration public event AsyncEventHandler ServerCertificateValidationCallback Event Type Type Description AsyncEventHandler < CertificateValidationEventArgs > | Improve this Doc View Source ServerConnectionCountChanged Event occurs when server connection count changed. Declaration public event EventHandler ServerConnectionCountChanged Event Type Type Description EventHandler Implements System.IDisposable"
}
}
diff --git a/docs/xrefmap.yml b/docs/xrefmap.yml
index 64e7f4b74..e5b3def1c 100644
--- a/docs/xrefmap.yml
+++ b/docs/xrefmap.yml
@@ -3744,6 +3744,19 @@ references:
isSpec: "True"
fullName: Titanium.Web.Proxy.ProxyServer.RemoveEndPoint
nameWithType: ProxyServer.RemoveEndPoint
+- uid: Titanium.Web.Proxy.ProxyServer.RestoreOriginalProxySettings
+ name: RestoreOriginalProxySettings()
+ href: api/Titanium.Web.Proxy.ProxyServer.html#Titanium_Web_Proxy_ProxyServer_RestoreOriginalProxySettings
+ commentId: M:Titanium.Web.Proxy.ProxyServer.RestoreOriginalProxySettings
+ fullName: Titanium.Web.Proxy.ProxyServer.RestoreOriginalProxySettings()
+ nameWithType: ProxyServer.RestoreOriginalProxySettings()
+- uid: Titanium.Web.Proxy.ProxyServer.RestoreOriginalProxySettings*
+ name: RestoreOriginalProxySettings
+ href: api/Titanium.Web.Proxy.ProxyServer.html#Titanium_Web_Proxy_ProxyServer_RestoreOriginalProxySettings_
+ commentId: Overload:Titanium.Web.Proxy.ProxyServer.RestoreOriginalProxySettings
+ isSpec: "True"
+ fullName: Titanium.Web.Proxy.ProxyServer.RestoreOriginalProxySettings
+ nameWithType: ProxyServer.RestoreOriginalProxySettings
- uid: Titanium.Web.Proxy.ProxyServer.ReuseSocket
name: ReuseSocket
href: api/Titanium.Web.Proxy.ProxyServer.html#Titanium_Web_Proxy_ProxyServer_ReuseSocket
diff --git a/examples/Titanium.Web.Proxy.Examples.Basic/ProxyTestController.cs b/examples/Titanium.Web.Proxy.Examples.Basic/ProxyTestController.cs
index 04681b95c..6f1e6446c 100644
--- a/examples/Titanium.Web.Proxy.Examples.Basic/ProxyTestController.cs
+++ b/examples/Titanium.Web.Proxy.Examples.Basic/ProxyTestController.cs
@@ -119,7 +119,7 @@ public void Stop()
private async Task onBeforeTunnelConnectRequest(object sender, TunnelConnectSessionEventArgs e)
{
string hostname = e.HttpClient.Request.RequestUri.Host;
- await writeToConsole("Tunnel to: " + hostname);
+ //await writeToConsole("Tunnel to: " + hostname);
if (hostname.Contains("dropbox.com"))
{
@@ -138,8 +138,8 @@ private Task onBeforeTunnelConnectResponse(object sender, TunnelConnectSessionEv
// intecept & cancel redirect or update requests
private async Task onRequest(object sender, SessionEventArgs e)
{
- await writeToConsole("Active Client Connections:" + ((ProxyServer)sender).ClientConnectionCount);
- await writeToConsole(e.HttpClient.Request.Url);
+ //await writeToConsole("Active Client Connections:" + ((ProxyServer)sender).ClientConnectionCount);
+ //await writeToConsole(e.HttpClient.Request.Url);
// store it in the UserData property
// It can be a simple integer, Guid, or any type
@@ -189,7 +189,7 @@ private async Task multipartRequestPartSent(object sender, MultipartRequestPartS
private async Task onResponse(object sender, SessionEventArgs e)
{
- await writeToConsole("Active Server Connections:" + ((ProxyServer)sender).ServerConnectionCount);
+ //await writeToConsole("Active Server Connections:" + ((ProxyServer)sender).ServerConnectionCount);
string ext = System.IO.Path.GetExtension(e.HttpClient.Request.RequestUri.AbsolutePath);
diff --git a/examples/Titanium.Web.Proxy.Examples.Basic/Titanium.Web.Proxy.Examples.Basic.Mono.csproj b/examples/Titanium.Web.Proxy.Examples.Basic/Titanium.Web.Proxy.Examples.Basic.Mono.csproj
index bef8de10e..80a278309 100644
--- a/examples/Titanium.Web.Proxy.Examples.Basic/Titanium.Web.Proxy.Examples.Basic.Mono.csproj
+++ b/examples/Titanium.Web.Proxy.Examples.Basic/Titanium.Web.Proxy.Examples.Basic.Mono.csproj
@@ -2,7 +2,7 @@
Exe
- net45
+ net461
false
7.1
AnyCPU;x64
diff --git a/examples/Titanium.Web.Proxy.Examples.Basic/Titanium.Web.Proxy.Examples.Basic.NetCore.csproj b/examples/Titanium.Web.Proxy.Examples.Basic/Titanium.Web.Proxy.Examples.Basic.NetCore.csproj
index cd8de97f1..4744326f0 100644
--- a/examples/Titanium.Web.Proxy.Examples.Basic/Titanium.Web.Proxy.Examples.Basic.NetCore.csproj
+++ b/examples/Titanium.Web.Proxy.Examples.Basic/Titanium.Web.Proxy.Examples.Basic.NetCore.csproj
@@ -12,7 +12,7 @@
-
+
\ No newline at end of file
diff --git a/examples/Titanium.Web.Proxy.Examples.Basic/Titanium.Web.Proxy.Examples.Basic.csproj b/examples/Titanium.Web.Proxy.Examples.Basic/Titanium.Web.Proxy.Examples.Basic.csproj
index 871cc90e7..18914479a 100644
--- a/examples/Titanium.Web.Proxy.Examples.Basic/Titanium.Web.Proxy.Examples.Basic.csproj
+++ b/examples/Titanium.Web.Proxy.Examples.Basic/Titanium.Web.Proxy.Examples.Basic.csproj
@@ -2,10 +2,9 @@
Exe
- net45;netcoreapp2.1
+ net461;netcoreapp2.1
false
7.1
- AnyCPU;x64
diff --git a/examples/Titanium.Web.Proxy.Examples.Wpf/MainWindow.xaml b/examples/Titanium.Web.Proxy.Examples.Wpf/MainWindow.xaml
index 1739dedcf..ec5e4ff33 100644
--- a/examples/Titanium.Web.Proxy.Examples.Wpf/MainWindow.xaml
+++ b/examples/Titanium.Web.Proxy.Examples.Wpf/MainWindow.xaml
@@ -54,6 +54,7 @@
+
diff --git a/examples/Titanium.Web.Proxy.Examples.Wpf/MainWindow.xaml.cs b/examples/Titanium.Web.Proxy.Examples.Wpf/MainWindow.xaml.cs
index 9e3ba6f57..e09defe8d 100644
--- a/examples/Titanium.Web.Proxy.Examples.Wpf/MainWindow.xaml.cs
+++ b/examples/Titanium.Web.Proxy.Examples.Wpf/MainWindow.xaml.cs
@@ -8,6 +8,7 @@
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
using System.Windows.Input;
using System.Windows.Media.Imaging;
using Titanium.Web.Proxy.EventArguments;
@@ -39,7 +40,7 @@ public MainWindow()
{
proxyServer = new ProxyServer();
- proxyServer.EnableHttp2 = true;
+ //proxyServer.EnableHttp2 = true;
//proxyServer.CertificateManager.CertificateEngine = CertificateEngine.DefaultWindows;
@@ -95,7 +96,7 @@ public MainWindow()
Dispatcher.Invoke(() => { ServerConnectionCount = proxyServer.ServerConnectionCount; });
};
proxyServer.Start();
-
+
proxyServer.SetAsSystemProxy(explicitEndPoint, ProxyProtocolType.AllHttp);
InitializeComponent();
@@ -152,35 +153,23 @@ await Dispatcher.InvokeAsync(() =>
private async Task ProxyServer_BeforeRequest(object sender, SessionEventArgs e)
{
- if (e.HttpClient.ConnectRequest?.TunnelType != TunnelType.Http2)
- {
- return;
- }
-
SessionListItem item = null;
await Dispatcher.InvokeAsync(() => { item = addSession(e); });
- //if (e.HttpClient.ConnectRequest?.TunnelType == TunnelType.Http2)
- //{
- //}
-
- //if (!e.HttpClient.Request.RequestUri.ToString().Contains("/mail/u/"))
- // return;
-
if (e.HttpClient.Request.HasBody)
{
e.HttpClient.Request.KeepBody = true;
await e.GetRequestBody();
+
+ if (item == SelectedSession)
+ {
+ await Dispatcher.InvokeAsync(selectedSessionChanged);
+ }
}
}
private async Task ProxyServer_BeforeResponse(object sender, SessionEventArgs e)
{
- if (e.HttpClient.ConnectRequest?.TunnelType != TunnelType.Http2)
- {
- return;
- }
-
SessionListItem item = null;
await Dispatcher.InvokeAsync(() =>
{
@@ -202,6 +191,10 @@ await Dispatcher.InvokeAsync(() =>
await e.GetResponseBody();
await Dispatcher.InvokeAsync(() => { item.Update(); });
+ if (item == SelectedSession)
+ {
+ await Dispatcher.InvokeAsync(selectedSessionChanged);
+ }
}
}
}
@@ -292,15 +285,26 @@ private void ListViewSessions_OnKeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Delete)
{
+ bool isSelected = false;
var selectedItems = ((ListView)sender).SelectedItems;
Sessions.SuppressNotification = true;
foreach (var item in selectedItems.Cast().ToArray())
{
+ if (item == SelectedSession)
+ {
+ isSelected = true;
+ }
+
Sessions.Remove(item);
sessionDictionary.Remove(item.HttpClient);
}
Sessions.SuppressNotification = false;
+
+ if (isSelected)
+ {
+ SelectedSession = null;
+ }
}
}
@@ -308,6 +312,9 @@ private void selectedSessionChanged()
{
if (SelectedSession == null)
{
+ TextBoxRequest.Text = null;
+ TextBoxResponse.Text = string.Empty;
+ ImageResponse.Source = null;
return;
}
@@ -315,7 +322,7 @@ private void selectedSessionChanged()
var session = SelectedSession.HttpClient;
var request = session.Request;
- var fullData = (request.IsBodyRead ? request.Body : null) ?? new byte[0];
+ var fullData = (request.IsBodyRead ? request.Body : null) ?? Array.Empty();
var data = fullData;
bool truncated = data.Length > truncateLimit;
if (truncated)
@@ -332,7 +339,7 @@ private void selectedSessionChanged()
TextBoxRequest.Text = sb.ToString();
var response = session.Response;
- fullData = (response.IsBodyRead ? response.Body : null) ?? new byte[0];
+ fullData = (response.IsBodyRead ? response.Body : null) ?? Array.Empty();
data = fullData;
truncated = data.Length > truncateLimit;
if (truncated)
@@ -356,10 +363,13 @@ private void selectedSessionChanged()
try
{
- using (MemoryStream stream = new MemoryStream(fullData))
+ if (fullData.Length > 0)
{
- ImageResponse.Source =
- BitmapFrame.Create(stream, BitmapCreateOptions.None, BitmapCacheOption.OnLoad);
+ using (var stream = new MemoryStream(fullData))
+ {
+ ImageResponse.Source =
+ BitmapFrame.Create(stream, BitmapCreateOptions.None, BitmapCacheOption.OnLoad);
+ }
}
}
catch
@@ -367,5 +377,19 @@ private void selectedSessionChanged()
ImageResponse.Source = null;
}
}
+
+ private void ButtonProxyOnOff_OnClick(object sender, RoutedEventArgs e)
+ {
+ var button = (ToggleButton)sender;
+ if (button.IsChecked == true)
+ {
+ proxyServer.SetAsSystemProxy((ExplicitProxyEndPoint)proxyServer.ProxyEndPoints[0],
+ ProxyProtocolType.AllHttp);
+ }
+ else
+ {
+ proxyServer.RestoreOriginalProxySettings();
+ }
+ }
}
}
diff --git a/examples/Titanium.Web.Proxy.Examples.Wpf/Properties/Resources.Designer.cs b/examples/Titanium.Web.Proxy.Examples.Wpf/Properties/Resources.Designer.cs
index 599d7100a..22180b6c3 100644
--- a/examples/Titanium.Web.Proxy.Examples.Wpf/Properties/Resources.Designer.cs
+++ b/examples/Titanium.Web.Proxy.Examples.Wpf/Properties/Resources.Designer.cs
@@ -19,7 +19,7 @@ namespace Titanium.Web.Proxy.Examples.Wpf.Properties {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
diff --git a/examples/Titanium.Web.Proxy.Examples.Wpf/Properties/Settings.Designer.cs b/examples/Titanium.Web.Proxy.Examples.Wpf/Properties/Settings.Designer.cs
index ec51c0229..64f6b3874 100644
--- a/examples/Titanium.Web.Proxy.Examples.Wpf/Properties/Settings.Designer.cs
+++ b/examples/Titanium.Web.Proxy.Examples.Wpf/Properties/Settings.Designer.cs
@@ -12,7 +12,7 @@ namespace Titanium.Web.Proxy.Examples.Wpf.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.1.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.1.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
diff --git a/examples/Titanium.Web.Proxy.Examples.Wpf/Titanium.Web.Proxy.Examples.Wpf.NetCore.csproj b/examples/Titanium.Web.Proxy.Examples.Wpf/Titanium.Web.Proxy.Examples.Wpf.NetCore.csproj
index 5619d9464..2379187e2 100644
--- a/examples/Titanium.Web.Proxy.Examples.Wpf/Titanium.Web.Proxy.Examples.Wpf.NetCore.csproj
+++ b/examples/Titanium.Web.Proxy.Examples.Wpf/Titanium.Web.Proxy.Examples.Wpf.NetCore.csproj
@@ -2,7 +2,7 @@
WinExe
- netcoreapp3.0
+ netcoreapp3.0
true
diff --git a/examples/Titanium.Web.Proxy.Examples.Wpf/Titanium.Web.Proxy.Examples.Wpf.csproj b/examples/Titanium.Web.Proxy.Examples.Wpf/Titanium.Web.Proxy.Examples.Wpf.csproj
index 9da37335b..90ad8f247 100644
--- a/examples/Titanium.Web.Proxy.Examples.Wpf/Titanium.Web.Proxy.Examples.Wpf.csproj
+++ b/examples/Titanium.Web.Proxy.Examples.Wpf/Titanium.Web.Proxy.Examples.Wpf.csproj
@@ -1,151 +1,67 @@
-
-
-
+
+
- Debug
- AnyCPU
- {4406CE17-9A39-4F28-8363-6169A4F799C1}
WinExe
- Titanium.Web.Proxy.Examples.Wpf
- Titanium.Web.Proxy.Examples.Wpf
- v4.5
- 512
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 4
- true
-
- publish\
- true
- Disk
- false
- Foreground
- 7
- Days
- false
- false
- true
- 0
- 1.0.0.%2a
- false
- false
- true
+ net461;netcoreapp3.0
+ true
-
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
- 7.1
-
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
- true
- bin\x64\Debug\
- DEBUG;TRACE
- full
- x64
- 7.1
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
- bin\x64\Release\
- TRACE
- true
- pdbonly
- x64
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
-
-
-
-
-
-
-
-
-
- 4.0
-
-
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Titanium.Web.Proxy.sln b/src/Titanium.Web.Proxy.sln
index bb70e0b1c..8949754d1 100644
--- a/src/Titanium.Web.Proxy.sln
+++ b/src/Titanium.Web.Proxy.sln
@@ -27,7 +27,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Titanium.Web.Proxy.UnitTest
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Titanium.Web.Proxy.Examples.Basic", "..\examples\Titanium.Web.Proxy.Examples.Basic\Titanium.Web.Proxy.Examples.Basic.csproj", "{1FAC4205-4445-4F2B-BB8F-618E8A0C15FD}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Titanium.Web.Proxy.Examples.Wpf", "..\examples\Titanium.Web.Proxy.Examples.Wpf\Titanium.Web.Proxy.Examples.Wpf.csproj", "{4406CE17-9A39-4F28-8363-6169A4F799C1}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Titanium.Web.Proxy.Examples.Wpf", "..\examples\Titanium.Web.Proxy.Examples.Wpf\Titanium.Web.Proxy.Examples.Wpf.csproj", "{4406CE17-9A39-4F28-8363-6169A4F799C1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Titanium.Web.Proxy.IntegrationTests", "..\tests\Titanium.Web.Proxy.IntegrationTests\Titanium.Web.Proxy.IntegrationTests.csproj", "{1D053D72-DCB4-4517-ACDD-D35ADC186950}"
EndProject
@@ -41,12 +41,12 @@ Global
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{91018B6D-A7A9-45BE-9CB3-79CBB8B169A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{91018B6D-A7A9-45BE-9CB3-79CBB8B169A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {91018B6D-A7A9-45BE-9CB3-79CBB8B169A6}.Debug|x64.ActiveCfg = Debug|x64
- {91018B6D-A7A9-45BE-9CB3-79CBB8B169A6}.Debug|x64.Build.0 = Debug|x64
+ {91018B6D-A7A9-45BE-9CB3-79CBB8B169A6}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {91018B6D-A7A9-45BE-9CB3-79CBB8B169A6}.Debug|x64.Build.0 = Debug|Any CPU
{91018B6D-A7A9-45BE-9CB3-79CBB8B169A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{91018B6D-A7A9-45BE-9CB3-79CBB8B169A6}.Release|Any CPU.Build.0 = Release|Any CPU
- {91018B6D-A7A9-45BE-9CB3-79CBB8B169A6}.Release|x64.ActiveCfg = Release|x64
- {91018B6D-A7A9-45BE-9CB3-79CBB8B169A6}.Release|x64.Build.0 = Release|x64
+ {91018B6D-A7A9-45BE-9CB3-79CBB8B169A6}.Release|x64.ActiveCfg = Release|Any CPU
+ {91018B6D-A7A9-45BE-9CB3-79CBB8B169A6}.Release|x64.Build.0 = Release|Any CPU
{B517E3D0-D03B-436F-AB03-34BA0D5321AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B517E3D0-D03B-436F-AB03-34BA0D5321AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B517E3D0-D03B-436F-AB03-34BA0D5321AF}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -57,20 +57,19 @@ Global
{B517E3D0-D03B-436F-AB03-34BA0D5321AF}.Release|x64.Build.0 = Release|Any CPU
{1FAC4205-4445-4F2B-BB8F-618E8A0C15FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1FAC4205-4445-4F2B-BB8F-618E8A0C15FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1FAC4205-4445-4F2B-BB8F-618E8A0C15FD}.Debug|x64.ActiveCfg = Debug|x64
- {1FAC4205-4445-4F2B-BB8F-618E8A0C15FD}.Debug|x64.Build.0 = Debug|x64
+ {1FAC4205-4445-4F2B-BB8F-618E8A0C15FD}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {1FAC4205-4445-4F2B-BB8F-618E8A0C15FD}.Debug|x64.Build.0 = Debug|Any CPU
{1FAC4205-4445-4F2B-BB8F-618E8A0C15FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1FAC4205-4445-4F2B-BB8F-618E8A0C15FD}.Release|Any CPU.Build.0 = Release|Any CPU
- {1FAC4205-4445-4F2B-BB8F-618E8A0C15FD}.Release|x64.ActiveCfg = Release|x64
- {1FAC4205-4445-4F2B-BB8F-618E8A0C15FD}.Release|x64.Build.0 = Release|x64
+ {1FAC4205-4445-4F2B-BB8F-618E8A0C15FD}.Release|x64.ActiveCfg = Release|Any CPU
+ {1FAC4205-4445-4F2B-BB8F-618E8A0C15FD}.Release|x64.Build.0 = Release|Any CPU
{4406CE17-9A39-4F28-8363-6169A4F799C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4406CE17-9A39-4F28-8363-6169A4F799C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4406CE17-9A39-4F28-8363-6169A4F799C1}.Debug|x64.ActiveCfg = Debug|x64
- {4406CE17-9A39-4F28-8363-6169A4F799C1}.Debug|x64.Build.0 = Debug|x64
+ {4406CE17-9A39-4F28-8363-6169A4F799C1}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {4406CE17-9A39-4F28-8363-6169A4F799C1}.Debug|x64.Build.0 = Debug|Any CPU
{4406CE17-9A39-4F28-8363-6169A4F799C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4406CE17-9A39-4F28-8363-6169A4F799C1}.Release|Any CPU.Build.0 = Release|Any CPU
- {4406CE17-9A39-4F28-8363-6169A4F799C1}.Release|x64.ActiveCfg = Release|x64
- {4406CE17-9A39-4F28-8363-6169A4F799C1}.Release|x64.Build.0 = Release|x64
+ {4406CE17-9A39-4F28-8363-6169A4F799C1}.Release|x64.ActiveCfg = Release|Any CPU
+ {4406CE17-9A39-4F28-8363-6169A4F799C1}.Release|x64.Build.0 = Release|Any CPU
{1D053D72-DCB4-4517-ACDD-D35ADC186950}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1D053D72-DCB4-4517-ACDD-D35ADC186950}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1D053D72-DCB4-4517-ACDD-D35ADC186950}.Debug|x64.ActiveCfg = Debug|Any CPU
diff --git a/src/Titanium.Web.Proxy/ExplicitClientHandler.cs b/src/Titanium.Web.Proxy/ExplicitClientHandler.cs
index 3355aeb57..9bd7d4fc2 100644
--- a/src/Titanium.Web.Proxy/ExplicitClientHandler.cs
+++ b/src/Titanium.Web.Proxy/ExplicitClientHandler.cs
@@ -265,8 +265,8 @@ await clientStreamWriter.WriteResponseAsync(connectArgs.HttpClient.Response,
try
{
- await clientStream.ReadAsync(data, 0, available, cancellationToken);
// clientStream.Available should be at most BufferSize because it is using the same buffer size
+ await clientStream.ReadAsync(data, 0, available, cancellationToken);
await connection.StreamWriter.WriteAsync(data, 0, available, true, cancellationToken);
}
finally
@@ -279,10 +279,13 @@ await clientStreamWriter.WriteResponseAsync(connectArgs.HttpClient.Response,
((ConnectResponse)connectArgs.HttpClient.Response).ServerHelloInfo = serverHelloInfo;
}
- await TcpHelper.SendRaw(clientStream, connection.Stream, BufferPool, BufferSize,
- (buffer, offset, count) => { connectArgs.OnDataSent(buffer, offset, count); },
- (buffer, offset, count) => { connectArgs.OnDataReceived(buffer, offset, count); },
- connectArgs.CancellationTokenSource, ExceptionFunc);
+ if (!clientStream.IsClosed && !connection.Stream.IsClosed)
+ {
+ await TcpHelper.SendRaw(clientStream, connection.Stream, BufferPool, BufferSize,
+ (buffer, offset, count) => { connectArgs.OnDataSent(buffer, offset, count); },
+ (buffer, offset, count) => { connectArgs.OnDataReceived(buffer, offset, count); },
+ connectArgs.CancellationTokenSource, ExceptionFunc);
+ }
}
finally
{
diff --git a/src/Titanium.Web.Proxy/Helpers/HttpHelper.cs b/src/Titanium.Web.Proxy/Helpers/HttpHelper.cs
index 8527c2b89..f9751f752 100644
--- a/src/Titanium.Web.Proxy/Helpers/HttpHelper.cs
+++ b/src/Titanium.Web.Proxy/Helpers/HttpHelper.cs
@@ -1,4 +1,5 @@
using System;
+using System.Net;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
@@ -99,7 +100,13 @@ internal static string GetWildCardDomainName(string hostname)
{
// only for subdomains we need wild card
// example www.google.com or gstatic.google.com
- // but NOT for google.com
+ // but NOT for google.com or IP address
+
+ if (IPAddress.TryParse(hostname, out _))
+ {
+ return hostname;
+ }
+
if (hostname.Split(ProxyConstants.DotSplit).Length > 2)
{
int idx = hostname.IndexOf(ProxyConstants.DotSplit);
diff --git a/src/Titanium.Web.Proxy/Helpers/RunTime.cs b/src/Titanium.Web.Proxy/Helpers/RunTime.cs
index 52a1c3720..c116f00e5 100644
--- a/src/Titanium.Web.Proxy/Helpers/RunTime.cs
+++ b/src/Titanium.Web.Proxy/Helpers/RunTime.cs
@@ -9,56 +9,38 @@ namespace Titanium.Web.Proxy.Helpers
///
public static class RunTime
{
- ///
- /// cache for mono runtime check
- ///
- ///
private static readonly Lazy isRunningOnMono = new Lazy(() => Type.GetType("Mono.Runtime") != null);
///
- /// cache for mono runtime check
+ /// cache for Windows platform check
///
///
- private static readonly Lazy isRunningOnMonoLinux = new Lazy(() => IsRunningOnMono && (int)Environment.OSVersion.Platform == 4);
+ private static bool isRunningOnWindows => RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
///
/// cache for mono runtime check
///
///
- private static readonly Lazy isRunningOnMonoMac = new Lazy(() => IsRunningOnMono && (int)Environment.OSVersion.Platform == 6);
+ private static bool isRunningOnLinux => RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
-#if NETSTANDARD2_0
///
- /// cache for Windows platform check
+ /// cache for mac runtime check
///
///
- private static bool isRunningOnWindows => RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
- private static bool isRunningOnLinux => RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
private static bool isRunningOnMac => RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
-#endif
+
///
/// Is running on Mono?
///
internal static bool IsRunningOnMono => isRunningOnMono.Value;
-#if NETSTANDARD2_0
public static bool IsLinux => isRunningOnLinux;
-#else
- public static bool IsLinux => isRunningOnMonoLinux.Value;
-#endif
-#if NETSTANDARD2_0
public static bool IsWindows => isRunningOnWindows;
-#else
- public static bool IsWindows => !IsLinux && !IsMac;
-#endif
+
public static bool IsUwpOnWindows => IsWindows && UwpHelper.IsRunningAsUwp();
-#if NETSTANDARD2_0
public static bool IsMac => isRunningOnMac;
-#else
- public static bool IsMac => isRunningOnMonoMac.Value;
-#endif
//https://github.com/qmatteoq/DesktopBridgeHelpers/blob/master/DesktopBridge.Helpers/Helpers.cs
private class UwpHelper
diff --git a/src/Titanium.Web.Proxy/Http/Responses/GenericResponse.cs b/src/Titanium.Web.Proxy/Http/Responses/GenericResponse.cs
index a6f69da65..1e97350ab 100644
--- a/src/Titanium.Web.Proxy/Http/Responses/GenericResponse.cs
+++ b/src/Titanium.Web.Proxy/Http/Responses/GenericResponse.cs
@@ -1,4 +1,4 @@
-using System.Net;
+using System.Net;
using System.Web;
namespace Titanium.Web.Proxy.Http.Responses
@@ -15,14 +15,7 @@ public class GenericResponse : Response
public GenericResponse(HttpStatusCode status)
{
StatusCode = (int)status;
-
-#if NET45
- StatusDescription = HttpWorkerRequest.GetStatusDescription(StatusCode);
-#else
- // todo: this is not really correct, status description should contain spaces, too
- // see: https://tools.ietf.org/html/rfc7231#section-6.1
- StatusDescription = status.ToString();
-#endif
+ StatusDescription = Get(StatusCode);
}
///
@@ -35,5 +28,77 @@ public GenericResponse(int statusCode, string statusDescription)
StatusCode = statusCode;
StatusDescription = statusDescription;
}
+
+ internal static string Get(int code)
+ {
+ switch (code)
+ {
+ case 100: return "Continue";
+ case 101: return "Switching Protocols";
+ case 102: return "Processing";
+ case 103: return "Early Hints";
+
+ case 200: return "OK";
+ case 201: return "Created";
+ case 202: return "Accepted";
+ case 203: return "Non-Authoritative Information";
+ case 204: return "No Content";
+ case 205: return "Reset Content";
+ case 206: return "Partial Content";
+ case 207: return "Multi-Status";
+ case 208: return "Already Reported";
+ case 226: return "IM Used";
+
+ case 300: return "Multiple Choices";
+ case 301: return "Moved Permanently";
+ case 302: return "Found";
+ case 303: return "See Other";
+ case 304: return "Not Modified";
+ case 305: return "Use Proxy";
+ case 307: return "Temporary Redirect";
+ case 308: return "Permanent Redirect";
+
+ case 400: return "Bad Request";
+ case 401: return "Unauthorized";
+ case 402: return "Payment Required";
+ case 403: return "Forbidden";
+ case 404: return "Not Found";
+ case 405: return "Method Not Allowed";
+ case 406: return "Not Acceptable";
+ case 407: return "Proxy Authentication Required";
+ case 408: return "Request Timeout";
+ case 409: return "Conflict";
+ case 410: return "Gone";
+ case 411: return "Length Required";
+ case 412: return "Precondition Failed";
+ case 413: return "Request Entity Too Large";
+ case 414: return "Request-Uri Too Long";
+ case 415: return "Unsupported Media Type";
+ case 416: return "Requested Range Not Satisfiable";
+ case 417: return "Expectation Failed";
+ case 421: return "Misdirected Request";
+ case 422: return "Unprocessable Entity";
+ case 423: return "Locked";
+ case 424: return "Failed Dependency";
+ case 426: return "Upgrade Required"; // RFC 2817
+ case 428: return "Precondition Required";
+ case 429: return "Too Many Requests";
+ case 431: return "Request Header Fields Too Large";
+ case 451: return "Unavailable For Legal Reasons";
+
+ case 500: return "Internal Server Error";
+ case 501: return "Not Implemented";
+ case 502: return "Bad Gateway";
+ case 503: return "Service Unavailable";
+ case 504: return "Gateway Timeout";
+ case 505: return "Http Version Not Supported";
+ case 506: return "Variant Also Negotiates";
+ case 507: return "Insufficient Storage";
+ case 508: return "Loop Detected";
+ case 510: return "Not Extended";
+ case 511: return "Network Authentication Required";
+ }
+ return null;
+ }
}
}
diff --git a/src/Titanium.Web.Proxy/Network/Certificate/BCCertificateMaker.cs b/src/Titanium.Web.Proxy/Network/Certificate/BCCertificateMaker.cs
index 65da36de7..814b186c5 100644
--- a/src/Titanium.Web.Proxy/Network/Certificate/BCCertificateMaker.cs
+++ b/src/Titanium.Web.Proxy/Network/Certificate/BCCertificateMaker.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.IO;
using System.Security.Cryptography.X509Certificates;
using System.Threading;
@@ -141,21 +141,8 @@ private static X509Certificate2 generateCertificate(string hostName,
rsa.Prime1, rsa.Prime2, rsa.Exponent1,
rsa.Exponent2, rsa.Coefficient);
-#if NET45
// Set private key onto certificate instance
- X509Certificate2 x509Certificate;
- if (RunTime.IsRunningOnMono)
- {
- x509Certificate = withPrivateKey(certificate, rsaparams);
- }
- else
- {
- x509Certificate = new X509Certificate2(certificate.GetEncoded());
- x509Certificate.PrivateKey = DotNetUtilities.ToRSA(rsaparams);
- }
-#else
var x509Certificate = withPrivateKey(certificate, rsaparams);
-#endif
if (!doNotSetFriendlyName)
{
@@ -248,36 +235,6 @@ private X509Certificate2 makeCertificateInternal(string subject, bool isRoot,
bool switchToMtaIfNeeded, X509Certificate2 signingCert = null,
CancellationToken cancellationToken = default)
{
-#if NET45
- if (switchToMtaIfNeeded && Thread.CurrentThread.GetApartmentState() != ApartmentState.MTA)
- {
- X509Certificate2 certificate = null;
- using (var manualResetEvent = new ManualResetEventSlim(false))
- {
- ThreadPool.QueueUserWorkItem(o =>
- {
- try
- {
- certificate = makeCertificateInternal(subject, isRoot, false, signingCert);
- }
- catch (Exception ex)
- {
- exceptionFunc(new Exception("Failed to create BC certificate", ex));
- }
-
- if (!cancellationToken.IsCancellationRequested)
- {
- manualResetEvent.Set();
- }
- });
-
- manualResetEvent.Wait(TimeSpan.FromMinutes(1), cancellationToken);
- }
-
- return certificate;
- }
-#endif
-
return makeCertificateInternal(isRoot, subject, $"CN={subject}",
DateTime.UtcNow.AddDays(-certificateGraceDays), DateTime.UtcNow.AddDays(certificateValidDays),
isRoot ? null : signingCert);
diff --git a/src/Titanium.Web.Proxy/Network/Tcp/TcpConnectionFactory.cs b/src/Titanium.Web.Proxy/Network/Tcp/TcpConnectionFactory.cs
index 1d63db121..2f94734b8 100644
--- a/src/Titanium.Web.Proxy/Network/Tcp/TcpConnectionFactory.cs
+++ b/src/Titanium.Web.Proxy/Network/Tcp/TcpConnectionFactory.cs
@@ -481,6 +481,7 @@ private async Task clearOutdatedConnections()
{
try
{
+ var cutOff = DateTime.Now.AddSeconds(-1 * Server.ConnectionTimeOutSeconds);
foreach (var item in cache)
{
var queue = item.Value;
@@ -489,7 +490,6 @@ private async Task clearOutdatedConnections()
{
if (queue.TryDequeue(out var connection))
{
- var cutOff = DateTime.Now.AddSeconds(-1 * Server.ConnectionTimeOutSeconds);
if (!Server.EnableConnectionPool
|| connection.LastAccess < cutOff)
{
@@ -512,7 +512,7 @@ private async Task clearOutdatedConnections()
var emptyKeys = cache.Where(x => x.Value.Count == 0).Select(x => x.Key).ToList();
foreach (string key in emptyKeys)
{
- cache.TryRemove(key, out var _);
+ cache.TryRemove(key, out _);
}
}
finally
diff --git a/src/Titanium.Web.Proxy/ProxyServer.cs b/src/Titanium.Web.Proxy/ProxyServer.cs
index c364b5677..c7c0bf5fd 100644
--- a/src/Titanium.Web.Proxy/ProxyServer.cs
+++ b/src/Titanium.Web.Proxy/ProxyServer.cs
@@ -238,11 +238,7 @@ public ProxyServer(string rootCertificateName, string rootCertificateIssuerName,
///
/// List of supported Ssl versions.
///
- public SslProtocols SupportedSslProtocols { get; set; } =
-#if NET45
- SslProtocols.Ssl3 |
-#endif
- SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12;
+ public SslProtocols SupportedSslProtocols { get; set; } = SslProtocols.Ssl3 | SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12;
///
/// The buffer pool used throughout this proxy instance.
@@ -520,6 +516,20 @@ public void DisableSystemHttpsProxy()
DisableSystemProxy(ProxyProtocolType.Https);
}
+ ///
+ /// Restores the original proxy settings.
+ ///
+ public void RestoreOriginalProxySettings()
+ {
+ if (!RunTime.IsWindows)
+ {
+ throw new NotSupportedException(@"Setting system proxy settings are only supported in Windows.
+ Please manually configure your operating system to use this proxy's port and address.");
+ }
+
+ systemProxySettingsManager.RestoreOriginalSettings();
+ }
+
///
/// Clear the specified proxy setting for current machine.
///
@@ -528,7 +538,7 @@ public void DisableSystemProxy(ProxyProtocolType protocolType)
if (!RunTime.IsWindows)
{
throw new NotSupportedException(@"Setting system proxy settings are only supported in Windows.
- Please manually confugure you operating system to use this proxy's port and address.");
+ Please manually configure your operating system to use this proxy's port and address.");
}
systemProxySettingsManager.RemoveProxy(protocolType);
diff --git a/src/Titanium.Web.Proxy/RequestHandler.cs b/src/Titanium.Web.Proxy/RequestHandler.cs
index 749d0d0cf..e2d3628dd 100644
--- a/src/Titanium.Web.Proxy/RequestHandler.cs
+++ b/src/Titanium.Web.Proxy/RequestHandler.cs
@@ -65,6 +65,11 @@ private async Task handleHttpSessionRequest(ProxyEndPoint endPoint, TcpClientCon
// (assuming HTTP connection is kept alive by client)
while (true)
{
+ if (clientStream.IsClosed)
+ {
+ return;
+ }
+
// read the request line
string httpCmd = await clientStream.ReadLineAsync(cancellationToken);
@@ -255,11 +260,11 @@ await clientStreamWriter.WriteResponseAsync(args.HttpClient.Response,
throw new Exception("Session was terminated by user.");
}
- //Release server connection for each HTTP session instead of per client connection.
- //This will be more efficient especially when client is idly holding server connection
- //between sessions without using it.
- //Do not release authenticated connections for performance reasons.
- //Otherwise it will keep authenticating per session.
+ // Release server connection for each HTTP session instead of per client connection.
+ // This will be more efficient especially when client is idly holding server connection
+ // between sessions without using it.
+ // Do not release authenticated connections for performance reasons.
+ // Otherwise it will keep authenticating per session.
if (EnableConnectionPool && connection != null
&& !connection.IsWinAuthenticated)
{
diff --git a/src/Titanium.Web.Proxy/StreamExtended/BufferPool/DefaultBufferPool.cs b/src/Titanium.Web.Proxy/StreamExtended/BufferPool/DefaultBufferPool.cs
index 4b6f57712..e3fbb507c 100644
--- a/src/Titanium.Web.Proxy/StreamExtended/BufferPool/DefaultBufferPool.cs
+++ b/src/Titanium.Web.Proxy/StreamExtended/BufferPool/DefaultBufferPool.cs
@@ -1,4 +1,5 @@
-using System.Collections.Concurrent;
+using System.Buffers;
+using System.Collections.Concurrent;
namespace Titanium.Web.Proxy.StreamExtended.BufferPool
{
@@ -10,8 +11,6 @@ namespace Titanium.Web.Proxy.StreamExtended.BufferPool
///
public class DefaultBufferPool : IBufferPool
{
- private readonly ConcurrentStack buffers = new ConcurrentStack();
-
///
/// Gets a buffer.
///
@@ -19,12 +18,7 @@ public class DefaultBufferPool : IBufferPool
///
public byte[] GetBuffer(int bufferSize)
{
- if (!buffers.TryPop(out var buffer) || buffer.Length != bufferSize)
- {
- buffer = new byte[bufferSize];
- }
-
- return buffer;
+ return ArrayPool.Shared.Rent(bufferSize);
}
///
@@ -33,15 +27,11 @@ public byte[] GetBuffer(int bufferSize)
/// The buffer.
public void ReturnBuffer(byte[] buffer)
{
- if (buffer != null)
- {
- buffers.Push(buffer);
- }
+ ArrayPool.Shared.Return(buffer);
}
public void Dispose()
{
- buffers.Clear();
}
}
}
diff --git a/src/Titanium.Web.Proxy/StreamExtended/BufferPool/IBufferPool.cs b/src/Titanium.Web.Proxy/StreamExtended/BufferPool/IBufferPool.cs
index 5ede12244..22ebed7e0 100644
--- a/src/Titanium.Web.Proxy/StreamExtended/BufferPool/IBufferPool.cs
+++ b/src/Titanium.Web.Proxy/StreamExtended/BufferPool/IBufferPool.cs
@@ -9,6 +9,7 @@ namespace Titanium.Web.Proxy.StreamExtended.BufferPool
public interface IBufferPool : IDisposable
{
byte[] GetBuffer(int bufferSize);
+
void ReturnBuffer(byte[] buffer);
}
}
diff --git a/src/Titanium.Web.Proxy/StreamExtended/Network/CustomBufferedStream.cs b/src/Titanium.Web.Proxy/StreamExtended/Network/CustomBufferedStream.cs
index 6fc5bc7ce..766a4e0ec 100644
--- a/src/Titanium.Web.Proxy/StreamExtended/Network/CustomBufferedStream.cs
+++ b/src/Titanium.Web.Proxy/StreamExtended/Network/CustomBufferedStream.cs
@@ -1,6 +1,7 @@
using System;
using System.Diagnostics;
using System.IO;
+using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
@@ -16,13 +17,14 @@ namespace Titanium.Web.Proxy.StreamExtended.Network
///
public class CustomBufferedStream : Stream, ICustomStreamReader
{
- private readonly Stream baseStream;
private readonly bool leaveOpen;
private byte[] streamBuffer;
// default to UTF-8
private static readonly Encoding encoding = Encoding.UTF8;
+ private static readonly bool networkStreamHack = true;
+
private int bufferLength;
private int bufferPos;
@@ -39,8 +41,28 @@ public class CustomBufferedStream : Stream, ICustomStreamReader
public event EventHandler DataWrite;
+ public Stream BaseStream { get; }
+
public bool IsClosed => closed;
+ static CustomBufferedStream()
+ {
+ // TODO: remove this hack when removing .NET 4.x support
+ try
+ {
+ var method = typeof(NetworkStream).GetMethod(nameof(Stream.ReadAsync),
+ new Type[] { typeof(byte[]), typeof(int), typeof(int), typeof(CancellationToken) });
+ if (method != null && method.DeclaringType != typeof(Stream))
+ {
+ networkStreamHack = false;
+ }
+ }
+ catch
+ {
+ // ignore
+ }
+ }
+
///
/// Initializes a new instance of the class.
///
@@ -50,7 +72,7 @@ public class CustomBufferedStream : Stream, ICustomStreamReader
/// to leave the stream open after disposing the object; otherwise, .
public CustomBufferedStream(Stream baseStream, IBufferPool bufferPool, int bufferSize, bool leaveOpen = false)
{
- this.baseStream = baseStream;
+ BaseStream = baseStream;
BufferSize = bufferSize;
this.leaveOpen = leaveOpen;
streamBuffer = bufferPool.GetBuffer(bufferSize);
@@ -62,7 +84,7 @@ public CustomBufferedStream(Stream baseStream, IBufferPool bufferPool, int buffe
///
public override void Flush()
{
- baseStream.Flush();
+ BaseStream.Flush();
}
///
@@ -77,7 +99,7 @@ public override long Seek(long offset, SeekOrigin origin)
{
bufferLength = 0;
bufferPos = 0;
- return baseStream.Seek(offset, origin);
+ return BaseStream.Seek(offset, origin);
}
///
@@ -86,7 +108,7 @@ public override long Seek(long offset, SeekOrigin origin)
/// The desired length of the current stream in bytes.
public override void SetLength(long value)
{
- baseStream.SetLength(value);
+ BaseStream.SetLength(value);
}
///
@@ -126,7 +148,7 @@ public override int Read(byte[] buffer, int offset, int count)
public override void Write(byte[] buffer, int offset, int count)
{
OnDataWrite(buffer, offset, count);
- baseStream.Write(buffer, offset, count);
+ BaseStream.Write(buffer, offset, count);
}
///
@@ -159,7 +181,7 @@ public override async Task CopyToAsync(Stream destination, int bufferSize, Cance
///
public override Task FlushAsync(CancellationToken cancellationToken = default)
{
- return baseStream.FlushAsync(cancellationToken);
+ return BaseStream.FlushAsync(cancellationToken);
}
///
@@ -328,7 +350,7 @@ public override async Task WriteAsync(byte[] buffer, int offset, int count, Canc
{
OnDataWrite(buffer, offset, count);
- await baseStream.WriteAsync(buffer, offset, count, cancellationToken);
+ await BaseStream.WriteAsync(buffer, offset, count, cancellationToken);
}
///
@@ -342,7 +364,7 @@ public override void WriteByte(byte value)
{
buffer[0] = value;
OnDataWrite(buffer, 0, 1);
- baseStream.Write(buffer, 0, 1);
+ BaseStream.Write(buffer, 0, 1);
}
finally
{
@@ -372,7 +394,7 @@ protected override void Dispose(bool disposing)
closed = true;
if (!leaveOpen)
{
- baseStream.Dispose();
+ BaseStream.Dispose();
}
var buffer = streamBuffer;
@@ -384,27 +406,27 @@ protected override void Dispose(bool disposing)
///
/// When overridden in a derived class, gets a value indicating whether the current stream supports reading.
///
- public override bool CanRead => baseStream.CanRead;
+ public override bool CanRead => BaseStream.CanRead;
///
/// When overridden in a derived class, gets a value indicating whether the current stream supports seeking.
///
- public override bool CanSeek => baseStream.CanSeek;
+ public override bool CanSeek => BaseStream.CanSeek;
///
/// When overridden in a derived class, gets a value indicating whether the current stream supports writing.
///
- public override bool CanWrite => baseStream.CanWrite;
+ public override bool CanWrite => BaseStream.CanWrite;
///
/// Gets a value that determines whether the current stream can time out.
///
- public override bool CanTimeout => baseStream.CanTimeout;
+ public override bool CanTimeout => BaseStream.CanTimeout;
///
/// When overridden in a derived class, gets the length in bytes of the stream.
///
- public override long Length => baseStream.Length;
+ public override long Length => BaseStream.Length;
///
/// Gets a value indicating whether data is available.
@@ -421,8 +443,8 @@ protected override void Dispose(bool disposing)
///
public override long Position
{
- get => baseStream.Position;
- set => baseStream.Position = value;
+ get => BaseStream.Position;
+ set => BaseStream.Position = value;
}
///
@@ -430,8 +452,8 @@ public override long Position
///
public override int ReadTimeout
{
- get => baseStream.ReadTimeout;
- set => baseStream.ReadTimeout = value;
+ get => BaseStream.ReadTimeout;
+ set => BaseStream.ReadTimeout = value;
}
///
@@ -439,8 +461,8 @@ public override int ReadTimeout
///
public override int WriteTimeout
{
- get => baseStream.WriteTimeout;
- set => baseStream.WriteTimeout = value;
+ get => BaseStream.WriteTimeout;
+ set => BaseStream.WriteTimeout = value;
}
///
@@ -450,29 +472,35 @@ public bool FillBuffer()
{
if (closed)
{
- return false;
+ throw new Exception("Stream is already closed");
}
if (bufferLength > 0)
{
//normally we fill the buffer only when it is empty, but sometimes we need more data
- //move the remanining data to the beginning of the buffer
+ //move the remaining data to the beginning of the buffer
Buffer.BlockCopy(streamBuffer, bufferPos, streamBuffer, 0, bufferLength);
}
bufferPos = 0;
- int readBytes = baseStream.Read(streamBuffer, bufferLength, streamBuffer.Length - bufferLength);
- bool result = readBytes > 0;
- if (result)
+ bool result = false;
+ try
{
- OnDataRead(streamBuffer, bufferLength, readBytes);
- bufferLength += readBytes;
+ int readBytes = BaseStream.Read(streamBuffer, bufferLength, streamBuffer.Length - bufferLength);
+ result = readBytes > 0;
+ if (result)
+ {
+ OnDataRead(streamBuffer, bufferLength, readBytes);
+ bufferLength += readBytes;
+ }
}
- else
+ finally
{
- closed = true;
- throw new EndOfStreamException();
+ if (!result)
+ {
+ closed = true;
+ }
}
return result;
@@ -488,7 +516,7 @@ public async Task FillBufferAsync(CancellationToken cancellationToken = de
{
if (closed)
{
- return false;
+ throw new Exception("Stream is already closed");
}
if (bufferLength > 0)
@@ -506,17 +534,23 @@ public async Task FillBufferAsync(CancellationToken cancellationToken = de
bufferPos = 0;
- int readBytes = await baseStream.ReadAsync(streamBuffer, bufferLength, bytesToRead, cancellationToken);
- bool result = readBytes > 0;
- if (result)
+ bool result = false;
+ try
{
- OnDataRead(streamBuffer, bufferLength, readBytes);
- bufferLength += readBytes;
+ int readBytes = await BaseStream.ReadAsync(streamBuffer, bufferLength, bytesToRead, cancellationToken);
+ result = readBytes > 0;
+ if (result)
+ {
+ OnDataRead(streamBuffer, bufferLength, readBytes);
+ bufferLength += readBytes;
+ }
}
- else
+ finally
{
- closed = true;
- throw new EndOfStreamException();
+ if (!result)
+ {
+ closed = true;
+ }
}
return result;
@@ -610,8 +644,6 @@ private static void ResizeBuffer(ref byte[] buffer, long size)
buffer = newBuffer;
}
-#if NET45 || NETSTANDARD2_0
-
///
/// Base Stream.BeginRead will call this.Read and block thread (we don't want this, Network stream handles async)
/// In order to really async Reading Launch this.ReadAsync as Task will fire NetworkStream.ReadAsync
@@ -622,6 +654,11 @@ private static void ResizeBuffer(ref byte[] buffer, long size)
///
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
{
+ if (!networkStreamHack)
+ {
+ return base.BeginRead(buffer, offset, count, callback, state);
+ }
+
var vAsyncResult = this.ReadAsync(buffer, offset, count);
vAsyncResult.ContinueWith(pAsyncResult =>
@@ -640,6 +677,11 @@ public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, Asy
///
public override int EndRead(IAsyncResult asyncResult)
{
+ if (!networkStreamHack)
+ {
+ return base.EndRead(asyncResult);
+ }
+
return ((TaskResult)asyncResult).Result;
}
@@ -653,6 +695,11 @@ public override int EndRead(IAsyncResult asyncResult)
///
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
{
+ if (!networkStreamHack)
+ {
+ return base.BeginWrite(buffer, offset, count, callback, state);
+ }
+
var vAsyncResult = this.WriteAsync(buffer, offset, count);
vAsyncResult.ContinueWith(pAsyncResult =>
@@ -664,9 +711,13 @@ public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, As
}
public override void EndWrite(IAsyncResult asyncResult)
{
+ if (!networkStreamHack)
+ {
+ base.EndWrite(asyncResult);
+ return;
+ }
+
((TaskResult)asyncResult).GetResult();
}
-
-#endif
}
}
diff --git a/src/Titanium.Web.Proxy/StreamExtended/TaskExtended.cs b/src/Titanium.Web.Proxy/StreamExtended/Network/TaskResult.cs
similarity index 81%
rename from src/Titanium.Web.Proxy/StreamExtended/TaskExtended.cs
rename to src/Titanium.Web.Proxy/StreamExtended/Network/TaskResult.cs
index 988e8669f..42553c2d3 100644
--- a/src/Titanium.Web.Proxy/StreamExtended/TaskExtended.cs
+++ b/src/Titanium.Web.Proxy/StreamExtended/Network/TaskResult.cs
@@ -2,7 +2,7 @@
using System.Threading;
using System.Threading.Tasks;
-namespace Titanium.Web.Proxy.StreamExtended
+namespace Titanium.Web.Proxy.StreamExtended.Network
{
///
/// Mimic a Task but you can set AsyncState
@@ -11,18 +11,22 @@ namespace Titanium.Web.Proxy.StreamExtended
public class TaskResult : IAsyncResult
{
Task Task;
- object mAsyncState;
+ readonly object asyncState;
public TaskResult(Task pTask, object state)
{
Task = pTask;
- mAsyncState = state;
+ asyncState = state;
}
- public object AsyncState => mAsyncState;
+ public object AsyncState => asyncState;
+
public WaitHandle AsyncWaitHandle => ((IAsyncResult)Task).AsyncWaitHandle;
+
public bool CompletedSynchronously => ((IAsyncResult)Task).CompletedSynchronously;
+
public bool IsCompleted => Task.IsCompleted;
+
public void GetResult() { this.Task.GetAwaiter().GetResult(); }
}
@@ -33,20 +37,22 @@ public TaskResult(Task pTask, object state)
public class TaskResult : IAsyncResult
{
Task Task;
- object mAsyncState;
+ readonly object asyncState;
public TaskResult(Task pTask, object state)
{
Task = pTask;
- mAsyncState = state;
+ asyncState = state;
}
- public object AsyncState => mAsyncState;
+ public object AsyncState => asyncState;
+
public WaitHandle AsyncWaitHandle => ((IAsyncResult)Task).AsyncWaitHandle;
+
public bool CompletedSynchronously => ((IAsyncResult)Task).CompletedSynchronously;
+
public bool IsCompleted => Task.IsCompleted;
+
public T Result => Task.Result;
}
-
-
}
diff --git a/src/Titanium.Web.Proxy/Titanium.Web.Proxy.Mono.csproj b/src/Titanium.Web.Proxy/Titanium.Web.Proxy.Mono.csproj
index 13fbcc0f8..636db9e7f 100644
--- a/src/Titanium.Web.Proxy/Titanium.Web.Proxy.Mono.csproj
+++ b/src/Titanium.Web.Proxy/Titanium.Web.Proxy.Mono.csproj
@@ -1,7 +1,7 @@
- net45
+ net461
Titanium.Web.Proxy
false
True
@@ -14,9 +14,10 @@
+
-
+
diff --git a/src/Titanium.Web.Proxy/Titanium.Web.Proxy.NetCore.csproj b/src/Titanium.Web.Proxy/Titanium.Web.Proxy.NetCore.csproj
index 280ec7774..3424aa405 100644
--- a/src/Titanium.Web.Proxy/Titanium.Web.Proxy.NetCore.csproj
+++ b/src/Titanium.Web.Proxy/Titanium.Web.Proxy.NetCore.csproj
@@ -1,7 +1,7 @@
- netstandard2.0
+ netstandard2.0;netcoreapp2.1
Titanium.Web.Proxy
false
True
@@ -14,30 +14,27 @@
+
- 4.4.0
+ 4.5.0
- 4.4.1
+ 4.5.1
- 4.4.0
+ 4.5.0
- 4.4.1
+ 4.5.1
-
-
-
-
True
diff --git a/src/Titanium.Web.Proxy/Titanium.Web.Proxy.csproj b/src/Titanium.Web.Proxy/Titanium.Web.Proxy.csproj
index 27a8842af..3424aa405 100644
--- a/src/Titanium.Web.Proxy/Titanium.Web.Proxy.csproj
+++ b/src/Titanium.Web.Proxy/Titanium.Web.Proxy.csproj
@@ -1,7 +1,7 @@
- net45;netstandard2.0;netcoreapp2.1
+ netstandard2.0;netcoreapp2.1
Titanium.Web.Proxy
false
True
@@ -9,12 +9,12 @@
False
True
7.1
- AnyCPU;x64
+
@@ -35,10 +35,6 @@
-
-
-
-
True
diff --git a/src/Titanium.Web.Proxy/Titanium.Web.Proxy.nuspec b/src/Titanium.Web.Proxy/Titanium.Web.Proxy.nuspec
index d548d78f0..d186b7440 100644
--- a/src/Titanium.Web.Proxy/Titanium.Web.Proxy.nuspec
+++ b/src/Titanium.Web.Proxy/Titanium.Web.Proxy.nuspec
@@ -14,26 +14,24 @@
Copyright © Titanium. All rights reserved.
-
-
-
-
+
+
-
+
diff --git a/src/Titanium.Web.Proxy/TransparentClientHandler.cs b/src/Titanium.Web.Proxy/TransparentClientHandler.cs
index 786bebf34..4a63772d9 100644
--- a/src/Titanium.Web.Proxy/TransparentClientHandler.cs
+++ b/src/Titanium.Web.Proxy/TransparentClientHandler.cs
@@ -103,7 +103,6 @@ private async Task handleClient(TransparentProxyEndPoint endPoint, TcpClientConn
try
{
- CustomBufferedStream serverStream = null;
int available = clientStream.Available;
if (available > 0)
@@ -114,9 +113,7 @@ private async Task handleClient(TransparentProxyEndPoint endPoint, TcpClientConn
{
// clientStream.Available should be at most BufferSize because it is using the same buffer size
await clientStream.ReadAsync(data, 0, available, cancellationToken);
- serverStream = connection.Stream;
- await serverStream.WriteAsync(data, 0, available, cancellationToken);
- await serverStream.FlushAsync(cancellationToken);
+ await connection.StreamWriter.WriteAsync(data, 0, available, true, cancellationToken);
}
finally
{
@@ -124,8 +121,11 @@ private async Task handleClient(TransparentProxyEndPoint endPoint, TcpClientConn
}
}
- await TcpHelper.SendRaw(clientStream, serverStream, BufferPool, BufferSize,
- null, null, cancellationTokenSource, ExceptionFunc);
+ if (!clientStream.IsClosed && !connection.Stream.IsClosed)
+ {
+ await TcpHelper.SendRaw(clientStream, connection.Stream, BufferPool, BufferSize,
+ null, null, cancellationTokenSource, ExceptionFunc);
+ }
}
finally
{
diff --git a/tests/Titanium.Web.Proxy.UnitTests/Titanium.Web.Proxy.UnitTests.csproj b/tests/Titanium.Web.Proxy.UnitTests/Titanium.Web.Proxy.UnitTests.csproj
index d3f3bec32..496f9d971 100644
--- a/tests/Titanium.Web.Proxy.UnitTests/Titanium.Web.Proxy.UnitTests.csproj
+++ b/tests/Titanium.Web.Proxy.UnitTests/Titanium.Web.Proxy.UnitTests.csproj
@@ -1,7 +1,7 @@
- net45
+ net461
true
StrongNameKey.snk