Unverified Commit c225f431 authored by justcoding121's avatar justcoding121 Committed by GitHub

Merge pull request #477 from justcoding121/master

Beta
parents 4c563ee8 fbf347b6
......@@ -2,6 +2,9 @@
namespace Titanium.Web.Proxy.Http
{
/// <summary>
/// The tcp tunnel Connect request.
/// </summary>
public class ConnectRequest : Request
{
public ConnectRequest()
......
......@@ -4,6 +4,9 @@ using StreamExtended;
namespace Titanium.Web.Proxy.Http
{
/// <summary>
/// The tcp tunnel connect response object.
/// </summary>
public class ConnectResponse : Response
{
public ServerHelloInfo ServerHelloInfo { get; set; }
......
......@@ -8,6 +8,9 @@ using Titanium.Web.Proxy.Models;
namespace Titanium.Web.Proxy.Http
{
/// <summary>
/// The http header collection.
/// </summary>
[TypeConverter(typeof(ExpandableObjectConverter))]
public class HeaderCollection : IEnumerable<HttpHeader>
{
......
namespace Titanium.Web.Proxy.Http
{
/// <summary>
/// Well known http headers.
/// </summary>
public static class KnownHeaders
{
// Both
......
......@@ -10,6 +10,9 @@ using Titanium.Web.Proxy.Models;
namespace Titanium.Web.Proxy.Http
{
/// <summary>
/// Abstract base class for similar objects shared by both request and response objects.
/// </summary>
public abstract class RequestResponseBase
{
/// <summary>
......
......@@ -4,7 +4,7 @@ using System.Web;
namespace Titanium.Web.Proxy.Http.Responses
{
/// <summary>
/// Anything other than a 200 or 302 response
/// Anything other than a 200 or 302 http response.
/// </summary>
public class GenericResponse : Response
{
......
......@@ -3,7 +3,7 @@
namespace Titanium.Web.Proxy.Http.Responses
{
/// <summary>
/// 200 Ok response
/// The http 200 Ok response.
/// </summary>
public sealed class OkResponse : Response
{
......
......@@ -3,7 +3,7 @@
namespace Titanium.Web.Proxy.Http.Responses
{
/// <summary>
/// Redirect response
/// The http redirect response.
/// </summary>
public sealed class RedirectResponse : Response
{
......
......@@ -277,7 +277,7 @@ namespace Titanium.Web.Proxy.Network.Tcp
};
//linux has a bug with socket reuse in .net core.
if (proxyServer.ReuseSocket && !RunTime.IsLinux)
if (proxyServer.ReuseSocket && RunTime.IsWindows || RunTime.IsRunningOnMono)
{
tcpClient.Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
}
......
......@@ -193,7 +193,7 @@ namespace Titanium.Web.Proxy
/// <summary>
/// Should we reuse client/server tcp sockets.
/// Default is true (false for linux due to bug in .Net core).
/// Default is true (disabled for linux/macOS due to bug in .Net core).
/// </summary>
public bool ReuseSocket { get; set; } = true;
......@@ -617,8 +617,8 @@ namespace Titanium.Web.Proxy
{
endPoint.Listener = new TcpListener(endPoint.IpAddress, endPoint.Port);
//linux has a bug with socket reuse in .net core.
if (ReuseSocket && !RunTime.IsLinux)
//linux/macOS has a bug with socket reuse in .net core.
if (ReuseSocket && (RunTime.IsWindows || RunTime.IsRunningOnMono))
{
endPoint.Listener.Server.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
}
......
......@@ -83,7 +83,8 @@
<h1 id="Titanium_Web_Proxy_Http_ConnectRequest" data-uid="Titanium.Web.Proxy.Http.ConnectRequest" class="text-break">Class ConnectRequest
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 summary"><p>The tcp tunnel Connect request.</p>
</div>
<div class="markdown level0 conceptual"></div>
<div class="inheritance">
<h5>Inheritance</h5>
......
......@@ -83,7 +83,8 @@
<h1 id="Titanium_Web_Proxy_Http_ConnectResponse" data-uid="Titanium.Web.Proxy.Http.ConnectResponse" class="text-break">Class ConnectResponse
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 summary"><p>The tcp tunnel connect response object.</p>
</div>
<div class="markdown level0 conceptual"></div>
<div class="inheritance">
<h5>Inheritance</h5>
......
......@@ -83,7 +83,8 @@
<h1 id="Titanium_Web_Proxy_Http_HeaderCollection" data-uid="Titanium.Web.Proxy.Http.HeaderCollection" class="text-break">Class HeaderCollection
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 summary"><p>The http header collection.</p>
</div>
<div class="markdown level0 conceptual"></div>
<div class="inheritance">
<h5>Inheritance</h5>
......
......@@ -83,7 +83,8 @@
<h1 id="Titanium_Web_Proxy_Http_KnownHeaders" data-uid="Titanium.Web.Proxy.Http.KnownHeaders" class="text-break">Class KnownHeaders
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 summary"><p>Well known http headers.</p>
</div>
<div class="markdown level0 conceptual"></div>
<div class="inheritance">
<h5>Inheritance</h5>
......
......@@ -83,7 +83,8 @@
<h1 id="Titanium_Web_Proxy_Http_RequestResponseBase" data-uid="Titanium.Web.Proxy.Http.RequestResponseBase" class="text-break">Class RequestResponseBase
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 summary"><p>Abstract base class for similar objects shared by both request and response objects.</p>
</div>
<div class="markdown level0 conceptual"></div>
<div class="inheritance">
<h5>Inheritance</h5>
......
......@@ -83,7 +83,7 @@
<h1 id="Titanium_Web_Proxy_Http_Responses_GenericResponse" data-uid="Titanium.Web.Proxy.Http.Responses.GenericResponse" class="text-break">Class GenericResponse
</h1>
<div class="markdown level0 summary"><p>Anything other than a 200 or 302 response</p>
<div class="markdown level0 summary"><p>Anything other than a 200 or 302 http response.</p>
</div>
<div class="markdown level0 conceptual"></div>
<div class="inheritance">
......
......@@ -83,7 +83,7 @@
<h1 id="Titanium_Web_Proxy_Http_Responses_OkResponse" data-uid="Titanium.Web.Proxy.Http.Responses.OkResponse" class="text-break">Class OkResponse
</h1>
<div class="markdown level0 summary"><p>200 Ok response</p>
<div class="markdown level0 summary"><p>The http 200 Ok response.</p>
</div>
<div class="markdown level0 conceptual"></div>
<div class="inheritance">
......
......@@ -83,7 +83,7 @@
<h1 id="Titanium_Web_Proxy_Http_Responses_RedirectResponse" data-uid="Titanium.Web.Proxy.Http.Responses.RedirectResponse" class="text-break">Class RedirectResponse
</h1>
<div class="markdown level0 summary"><p>Redirect response</p>
<div class="markdown level0 summary"><p>The http redirect response.</p>
</div>
<div class="markdown level0 conceptual"></div>
<div class="inheritance">
......
......@@ -88,13 +88,13 @@
<h3 id="classes">Classes
</h3>
<h4><a class="xref" href="Titanium.Web.Proxy.Http.Responses.GenericResponse.html">GenericResponse</a></h4>
<section><p>Anything other than a 200 or 302 response</p>
<section><p>Anything other than a 200 or 302 http response.</p>
</section>
<h4><a class="xref" href="Titanium.Web.Proxy.Http.Responses.OkResponse.html">OkResponse</a></h4>
<section><p>200 Ok response</p>
<section><p>The http 200 Ok response.</p>
</section>
<h4><a class="xref" href="Titanium.Web.Proxy.Http.Responses.RedirectResponse.html">RedirectResponse</a></h4>
<section><p>Redirect response</p>
<section><p>The http redirect response.</p>
</section>
</article>
</div>
......
......@@ -88,21 +88,26 @@
<h3 id="classes">Classes
</h3>
<h4><a class="xref" href="Titanium.Web.Proxy.Http.ConnectRequest.html">ConnectRequest</a></h4>
<section></section>
<section><p>The tcp tunnel Connect request.</p>
</section>
<h4><a class="xref" href="Titanium.Web.Proxy.Http.ConnectResponse.html">ConnectResponse</a></h4>
<section></section>
<section><p>The tcp tunnel connect response object.</p>
</section>
<h4><a class="xref" href="Titanium.Web.Proxy.Http.HeaderCollection.html">HeaderCollection</a></h4>
<section></section>
<section><p>The http header collection.</p>
</section>
<h4><a class="xref" href="Titanium.Web.Proxy.Http.HttpWebClient.html">HttpWebClient</a></h4>
<section><p>Used to communicate with the server over HTTP(S)</p>
</section>
<h4><a class="xref" href="Titanium.Web.Proxy.Http.KnownHeaders.html">KnownHeaders</a></h4>
<section></section>
<section><p>Well known http headers.</p>
</section>
<h4><a class="xref" href="Titanium.Web.Proxy.Http.Request.html">Request</a></h4>
<section><p>Http(s) request object</p>
</section>
<h4><a class="xref" href="Titanium.Web.Proxy.Http.RequestResponseBase.html">RequestResponseBase</a></h4>
<section></section>
<section><p>Abstract base class for similar objects shared by both request and response objects.</p>
</section>
<h4><a class="xref" href="Titanium.Web.Proxy.Http.Response.html">Response</a></h4>
<section><p>Http(s) response object</p>
</section>
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment