Commit 56c835cb authored by Honfika's avatar Honfika

typo fix, http2 enabled flag added

parent 6e3ae006
...@@ -103,7 +103,7 @@ namespace Titanium.Web.Proxy ...@@ -103,7 +103,7 @@ namespace Titanium.Web.Proxy
if (await checkAuthorization(connectArgs) == false) if (await checkAuthorization(connectArgs) == false)
{ {
await endPoint.InvokeBeforeTunnectConnectResponse(this, connectArgs, ExceptionFunc); await endPoint.InvokeBeforeTunnelConnectResponse(this, connectArgs, ExceptionFunc);
// send the response // send the response
await clientStreamWriter.WriteResponseAsync(connectArgs.HttpClient.Response, await clientStreamWriter.WriteResponseAsync(connectArgs.HttpClient.Response,
...@@ -129,7 +129,7 @@ namespace Titanium.Web.Proxy ...@@ -129,7 +129,7 @@ namespace Titanium.Web.Proxy
connectRequest.ClientHelloInfo = clientHelloInfo; connectRequest.ClientHelloInfo = clientHelloInfo;
} }
await endPoint.InvokeBeforeTunnectConnectResponse(this, connectArgs, ExceptionFunc, isClientHello); await endPoint.InvokeBeforeTunnelConnectResponse(this, connectArgs, ExceptionFunc, isClientHello);
if (decryptSsl && isClientHello) if (decryptSsl && isClientHello)
{ {
...@@ -183,7 +183,7 @@ namespace Titanium.Web.Proxy ...@@ -183,7 +183,7 @@ namespace Titanium.Web.Proxy
// Successfully managed to authenticate the client using the fake certificate // Successfully managed to authenticate the client using the fake certificate
var options = new SslServerAuthenticationOptions(); var options = new SslServerAuthenticationOptions();
if (http2Supported) if (EnableHttp2 && http2Supported)
{ {
options.ApplicationProtocols = clientHelloInfo.GetAlpn(); options.ApplicationProtocols = clientHelloInfo.GetAlpn();
if (options.ApplicationProtocols == null || options.ApplicationProtocols.Count == 0) if (options.ApplicationProtocols == null || options.ApplicationProtocols.Count == 0)
......
...@@ -50,7 +50,7 @@ namespace Titanium.Web.Proxy.Models ...@@ -50,7 +50,7 @@ namespace Titanium.Web.Proxy.Models
} }
} }
internal async Task InvokeBeforeTunnectConnectResponse(ProxyServer proxyServer, internal async Task InvokeBeforeTunnelConnectResponse(ProxyServer proxyServer,
TunnelConnectSessionEventArgs connectArgs, ExceptionHandler exceptionFunc, bool isClientHello = false) TunnelConnectSessionEventArgs connectArgs, ExceptionHandler exceptionFunc, bool isClientHello = false)
{ {
if (BeforeTunnelConnectResponse != null) if (BeforeTunnelConnectResponse != null)
......
...@@ -144,6 +144,12 @@ namespace Titanium.Web.Proxy ...@@ -144,6 +144,12 @@ namespace Titanium.Web.Proxy
/// Defaults to false. /// Defaults to false.
/// </summary> /// </summary>
public bool EnableWinAuth { get; set; } public bool EnableWinAuth { get; set; }
/// <summary>
/// Enable disable HTTP/2 support. This setting is internal,
/// because the implementation is not finished
/// </summary>
internal bool EnableHttp2 { get; set; } = false;
/// <summary> /// <summary>
/// Should we check for certificate revocation during SSL authentication to servers /// Should we check for certificate revocation during SSL authentication to servers
......
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