Skip to content
This repository was archived by the owner on Jul 9, 2023. It is now read-only.

Commit c225f43

Browse files
Merge pull request #477 from justcoding121/master
Beta
2 parents 4c563ee + fbf347b commit c225f43

21 files changed

+58
-33
lines changed

Titanium.Web.Proxy/Http/ConnectRequest.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
namespace Titanium.Web.Proxy.Http
44
{
5+
/// <summary>
6+
/// The tcp tunnel Connect request.
7+
/// </summary>
58
public class ConnectRequest : Request
69
{
710
public ConnectRequest()

Titanium.Web.Proxy/Http/ConnectResponse.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
namespace Titanium.Web.Proxy.Http
66
{
7+
/// <summary>
8+
/// The tcp tunnel connect response object.
9+
/// </summary>
710
public class ConnectResponse : Response
811
{
912
public ServerHelloInfo ServerHelloInfo { get; set; }

Titanium.Web.Proxy/Http/HeaderCollection.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
namespace Titanium.Web.Proxy.Http
1010
{
11+
/// <summary>
12+
/// The http header collection.
13+
/// </summary>
1114
[TypeConverter(typeof(ExpandableObjectConverter))]
1215
public class HeaderCollection : IEnumerable<HttpHeader>
1316
{

Titanium.Web.Proxy/Http/KnownHeaders.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
namespace Titanium.Web.Proxy.Http
22
{
3+
/// <summary>
4+
/// Well known http headers.
5+
/// </summary>
36
public static class KnownHeaders
47
{
58
// Both

Titanium.Web.Proxy/Http/RequestResponseBase.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
namespace Titanium.Web.Proxy.Http
1212
{
13+
/// <summary>
14+
/// Abstract base class for similar objects shared by both request and response objects.
15+
/// </summary>
1316
public abstract class RequestResponseBase
1417
{
1518
/// <summary>

Titanium.Web.Proxy/Http/Responses/GenericResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
namespace Titanium.Web.Proxy.Http.Responses
55
{
66
/// <summary>
7-
/// Anything other than a 200 or 302 response
7+
/// Anything other than a 200 or 302 http response.
88
/// </summary>
99
public class GenericResponse : Response
1010
{

Titanium.Web.Proxy/Http/Responses/OkResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Titanium.Web.Proxy.Http.Responses
44
{
55
/// <summary>
6-
/// 200 Ok response
6+
/// The http 200 Ok response.
77
/// </summary>
88
public sealed class OkResponse : Response
99
{

Titanium.Web.Proxy/Http/Responses/RedirectResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Titanium.Web.Proxy.Http.Responses
44
{
55
/// <summary>
6-
/// Redirect response
6+
/// The http redirect response.
77
/// </summary>
88
public sealed class RedirectResponse : Response
99
{

Titanium.Web.Proxy/Network/Tcp/TcpConnectionFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ private async Task<TcpServerConnection> createServerConnection(string remoteHost
277277
};
278278

279279
//linux has a bug with socket reuse in .net core.
280-
if (proxyServer.ReuseSocket && !RunTime.IsLinux)
280+
if (proxyServer.ReuseSocket && RunTime.IsWindows || RunTime.IsRunningOnMono)
281281
{
282282
tcpClient.Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
283283
}

Titanium.Web.Proxy/ProxyServer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public ProxyServer(string rootCertificateName, string rootCertificateIssuerName,
193193

194194
/// <summary>
195195
/// Should we reuse client/server tcp sockets.
196-
/// Default is true (false for linux due to bug in .Net core).
196+
/// Default is true (disabled for linux/macOS due to bug in .Net core).
197197
/// </summary>
198198
public bool ReuseSocket { get; set; } = true;
199199

@@ -617,8 +617,8 @@ private void listen(ProxyEndPoint endPoint)
617617
{
618618
endPoint.Listener = new TcpListener(endPoint.IpAddress, endPoint.Port);
619619

620-
//linux has a bug with socket reuse in .net core.
621-
if (ReuseSocket && !RunTime.IsLinux)
620+
//linux/macOS has a bug with socket reuse in .net core.
621+
if (ReuseSocket && (RunTime.IsWindows || RunTime.IsRunningOnMono))
622622
{
623623
endPoint.Listener.Server.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
624624
}

0 commit comments

Comments
 (0)