Commit a2a7e4f3 authored by Taras Bulba's avatar Taras Bulba

Added another constructor to the ProxyServer to allow the root certificate...

Added another constructor to the ProxyServer to allow the root certificate name and issuer to be set
parent d3baf3f0
...@@ -118,8 +118,12 @@ namespace Titanium.Web.Proxy ...@@ -118,8 +118,12 @@ namespace Titanium.Web.Proxy
/// <summary> /// <summary>
/// Constructor /// Constructor
/// </summary> /// </summary>
public ProxyServer() public ProxyServer() : this(null, null) { }
public ProxyServer(string rootCertificateName, string rootCertificateIssuerName)
{ {
RootCertificateName = rootCertificateName;
RootCertificateIssuerName = rootCertificateIssuerName;
//default values //default values
ConnectionTimeOutSeconds = 120; ConnectionTimeOutSeconds = 120;
CertificateCacheTimeOutMinutes = 60; CertificateCacheTimeOutMinutes = 60;
...@@ -379,11 +383,11 @@ namespace Titanium.Web.Proxy ...@@ -379,11 +383,11 @@ namespace Titanium.Web.Proxy
} }
if (tcpClient != null) if (tcpClient != null)
{ {
Task.Run(async () => Task.Run(async () =>
{ {
try try
{ {
if (endPoint.GetType() == typeof(TransparentProxyEndPoint)) if (endPoint.GetType() == typeof(TransparentProxyEndPoint))
{ {
await HandleClient(endPoint as TransparentProxyEndPoint, tcpClient); await HandleClient(endPoint as TransparentProxyEndPoint, tcpClient);
...@@ -392,7 +396,7 @@ namespace Titanium.Web.Proxy ...@@ -392,7 +396,7 @@ namespace Titanium.Web.Proxy
{ {
await HandleClient(endPoint as ExplicitProxyEndPoint, tcpClient); await HandleClient(endPoint as ExplicitProxyEndPoint, tcpClient);
} }
} }
finally finally
{ {
......
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