Unverified Commit 61f93f4b authored by honfika's avatar honfika Committed by GitHub

Merge pull request #749 from justcoding121/master

beta
parents 1880a7d3 02541efd
......@@ -104,7 +104,7 @@
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/master/apiSpec/new?filename=Titanium_Web_Proxy_EventArguments_BeforeSslAuthenticateEventArgs_DecryptSsl.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.EventArguments.BeforeSslAuthenticateEventArgs.DecryptSsl%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/EventArguments/BeforeSslAuthenticateEventArgs.cs/#L31">View Source</a>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/EventArguments/BeforeSslAuthenticateEventArgs.cs/#L30">View Source</a>
</span>
<a id="Titanium_Web_Proxy_EventArguments_BeforeSslAuthenticateEventArgs_DecryptSsl_" data-uid="Titanium.Web.Proxy.EventArguments.BeforeSslAuthenticateEventArgs.DecryptSsl*"></a>
<h4 id="Titanium_Web_Proxy_EventArguments_BeforeSslAuthenticateEventArgs_DecryptSsl" data-uid="Titanium.Web.Proxy.EventArguments.BeforeSslAuthenticateEventArgs.DecryptSsl">DecryptSsl</h4>
......@@ -137,7 +137,7 @@ If false we relay the connection to the hostname mentioned in SniHostname.</p>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/master/apiSpec/new?filename=Titanium_Web_Proxy_EventArguments_BeforeSslAuthenticateEventArgs_SniHostName.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.EventArguments.BeforeSslAuthenticateEventArgs.SniHostName%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/EventArguments/BeforeSslAuthenticateEventArgs.cs/#L24">View Source</a>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/EventArguments/BeforeSslAuthenticateEventArgs.cs/#L23">View Source</a>
</span>
<a id="Titanium_Web_Proxy_EventArguments_BeforeSslAuthenticateEventArgs_SniHostName_" data-uid="Titanium.Web.Proxy.EventArguments.BeforeSslAuthenticateEventArgs.SniHostName*"></a>
<h4 id="Titanium_Web_Proxy_EventArguments_BeforeSslAuthenticateEventArgs_SniHostName" data-uid="Titanium.Web.Proxy.EventArguments.BeforeSslAuthenticateEventArgs.SniHostName">SniHostName</h4>
......@@ -171,7 +171,7 @@ TransparentEndPoint.</p>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/master/apiSpec/new?filename=Titanium_Web_Proxy_EventArguments_BeforeSslAuthenticateEventArgs_TerminateSession.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.EventArguments.BeforeSslAuthenticateEventArgs.TerminateSession%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/EventArguments/BeforeSslAuthenticateEventArgs.cs/#L36">View Source</a>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/EventArguments/BeforeSslAuthenticateEventArgs.cs/#L35">View Source</a>
</span>
<a id="Titanium_Web_Proxy_EventArguments_BeforeSslAuthenticateEventArgs_TerminateSession_" data-uid="Titanium.Web.Proxy.EventArguments.BeforeSslAuthenticateEventArgs.TerminateSession*"></a>
<h4 id="Titanium_Web_Proxy_EventArguments_BeforeSslAuthenticateEventArgs_TerminateSession" data-uid="Titanium.Web.Proxy.EventArguments.BeforeSslAuthenticateEventArgs.TerminateSession">TerminateSession()</h4>
......@@ -193,7 +193,7 @@ TransparentEndPoint.</p>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/master/apiSpec/new?filename=Titanium_Web_Proxy_EventArguments_BeforeSslAuthenticateEventArgs.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.EventArguments.BeforeSslAuthenticateEventArgs%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
</li>
<li>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/EventArguments/BeforeSslAuthenticateEventArgs.cs/#L10" class="contribution-link">View Source</a>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/EventArguments/BeforeSslAuthenticateEventArgs.cs/#L9" class="contribution-link">View Source</a>
</li>
</ul>
</div>
......
......@@ -105,7 +105,7 @@ during SSL authentication.</p>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/master/apiSpec/new?filename=Titanium_Web_Proxy_EventArguments_CertificateValidationEventArgs__ctor_Titanium_Web_Proxy_EventArguments_SessionEventArgsBase_System_Security_Cryptography_X509Certificates_X509Certificate_System_Security_Cryptography_X509Certificates_X509Chain_System_Net_Security_SslPolicyErrors_.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.EventArguments.CertificateValidationEventArgs.%23ctor(Titanium.Web.Proxy.EventArguments.SessionEventArgsBase%2CSystem.Security.Cryptography.X509Certificates.X509Certificate%2CSystem.Security.Cryptography.X509Certificates.X509Chain%2CSystem.Net.Security.SslPolicyErrors)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/EventArguments/CertificateValidationEventArgs.cs/#L13">View Source</a>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/EventArguments/CertificateValidationEventArgs.cs/#L12">View Source</a>
</span>
<a id="Titanium_Web_Proxy_EventArguments_CertificateValidationEventArgs__ctor_" data-uid="Titanium.Web.Proxy.EventArguments.CertificateValidationEventArgs.#ctor*"></a>
<h4 id="Titanium_Web_Proxy_EventArguments_CertificateValidationEventArgs__ctor_Titanium_Web_Proxy_EventArguments_SessionEventArgsBase_System_Security_Cryptography_X509Certificates_X509Certificate_System_Security_Cryptography_X509Certificates_X509Chain_System_Net_Security_SslPolicyErrors_" data-uid="Titanium.Web.Proxy.EventArguments.CertificateValidationEventArgs.#ctor(Titanium.Web.Proxy.EventArguments.SessionEventArgsBase,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Cryptography.X509Certificates.X509Chain,System.Net.Security.SslPolicyErrors)">CertificateValidationEventArgs(SessionEventArgsBase, X509Certificate, X509Chain, SslPolicyErrors)</h4>
......@@ -154,7 +154,7 @@ during SSL authentication.</p>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/master/apiSpec/new?filename=Titanium_Web_Proxy_EventArguments_CertificateValidationEventArgs_Certificate.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.EventArguments.CertificateValidationEventArgs.Certificate%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/EventArguments/CertificateValidationEventArgs.cs/#L29">View Source</a>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/EventArguments/CertificateValidationEventArgs.cs/#L28">View Source</a>
</span>
<a id="Titanium_Web_Proxy_EventArguments_CertificateValidationEventArgs_Certificate_" data-uid="Titanium.Web.Proxy.EventArguments.CertificateValidationEventArgs.Certificate*"></a>
<h4 id="Titanium_Web_Proxy_EventArguments_CertificateValidationEventArgs_Certificate" data-uid="Titanium.Web.Proxy.EventArguments.CertificateValidationEventArgs.Certificate">Certificate</h4>
......@@ -185,7 +185,7 @@ during SSL authentication.</p>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/master/apiSpec/new?filename=Titanium_Web_Proxy_EventArguments_CertificateValidationEventArgs_Chain.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.EventArguments.CertificateValidationEventArgs.Chain%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/EventArguments/CertificateValidationEventArgs.cs/#L34">View Source</a>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/EventArguments/CertificateValidationEventArgs.cs/#L33">View Source</a>
</span>
<a id="Titanium_Web_Proxy_EventArguments_CertificateValidationEventArgs_Chain_" data-uid="Titanium.Web.Proxy.EventArguments.CertificateValidationEventArgs.Chain*"></a>
<h4 id="Titanium_Web_Proxy_EventArguments_CertificateValidationEventArgs_Chain" data-uid="Titanium.Web.Proxy.EventArguments.CertificateValidationEventArgs.Chain">Chain</h4>
......@@ -216,7 +216,7 @@ during SSL authentication.</p>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/master/apiSpec/new?filename=Titanium_Web_Proxy_EventArguments_CertificateValidationEventArgs_IsValid.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.EventArguments.CertificateValidationEventArgs.IsValid%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/EventArguments/CertificateValidationEventArgs.cs/#L44">View Source</a>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/EventArguments/CertificateValidationEventArgs.cs/#L43">View Source</a>
</span>
<a id="Titanium_Web_Proxy_EventArguments_CertificateValidationEventArgs_IsValid_" data-uid="Titanium.Web.Proxy.EventArguments.CertificateValidationEventArgs.IsValid*"></a>
<h4 id="Titanium_Web_Proxy_EventArguments_CertificateValidationEventArgs_IsValid" data-uid="Titanium.Web.Proxy.EventArguments.CertificateValidationEventArgs.IsValid">IsValid</h4>
......@@ -247,7 +247,7 @@ during SSL authentication.</p>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/master/apiSpec/new?filename=Titanium_Web_Proxy_EventArguments_CertificateValidationEventArgs_Session.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.EventArguments.CertificateValidationEventArgs.Session%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/EventArguments/CertificateValidationEventArgs.cs/#L24">View Source</a>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/EventArguments/CertificateValidationEventArgs.cs/#L23">View Source</a>
</span>
<a id="Titanium_Web_Proxy_EventArguments_CertificateValidationEventArgs_Session_" data-uid="Titanium.Web.Proxy.EventArguments.CertificateValidationEventArgs.Session*"></a>
<h4 id="Titanium_Web_Proxy_EventArguments_CertificateValidationEventArgs_Session" data-uid="Titanium.Web.Proxy.EventArguments.CertificateValidationEventArgs.Session">Session</h4>
......@@ -278,7 +278,7 @@ during SSL authentication.</p>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/master/apiSpec/new?filename=Titanium_Web_Proxy_EventArguments_CertificateValidationEventArgs_SslPolicyErrors.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.EventArguments.CertificateValidationEventArgs.SslPolicyErrors%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/EventArguments/CertificateValidationEventArgs.cs/#L39">View Source</a>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/EventArguments/CertificateValidationEventArgs.cs/#L38">View Source</a>
</span>
<a id="Titanium_Web_Proxy_EventArguments_CertificateValidationEventArgs_SslPolicyErrors_" data-uid="Titanium.Web.Proxy.EventArguments.CertificateValidationEventArgs.SslPolicyErrors*"></a>
<h4 id="Titanium_Web_Proxy_EventArguments_CertificateValidationEventArgs_SslPolicyErrors" data-uid="Titanium.Web.Proxy.EventArguments.CertificateValidationEventArgs.SslPolicyErrors">SslPolicyErrors</h4>
......@@ -315,7 +315,7 @@ during SSL authentication.</p>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/master/apiSpec/new?filename=Titanium_Web_Proxy_EventArguments_CertificateValidationEventArgs.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.EventArguments.CertificateValidationEventArgs%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
</li>
<li>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/EventArguments/CertificateValidationEventArgs.cs/#L11" class="contribution-link">View Source</a>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/EventArguments/CertificateValidationEventArgs.cs/#L10" class="contribution-link">View Source</a>
</li>
</ul>
</div>
......
......@@ -205,7 +205,7 @@
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/master/apiSpec/new?filename=Titanium_Web_Proxy_Http_ConnectRequest_ClientHelloInfo.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.Http.ConnectRequest.ClientHelloInfo%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/Http/ConnectRequest.cs/#L20">View Source</a>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/Http/ConnectRequest.cs/#L19">View Source</a>
</span>
<a id="Titanium_Web_Proxy_Http_ConnectRequest_ClientHelloInfo_" data-uid="Titanium.Web.Proxy.Http.ConnectRequest.ClientHelloInfo*"></a>
<h4 id="Titanium_Web_Proxy_Http_ConnectRequest_ClientHelloInfo" data-uid="Titanium.Web.Proxy.Http.ConnectRequest.ClientHelloInfo">ClientHelloInfo</h4>
......@@ -235,7 +235,7 @@
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/master/apiSpec/new?filename=Titanium_Web_Proxy_Http_ConnectRequest_TunnelType.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.Http.ConnectRequest.TunnelType%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/Http/ConnectRequest.cs/#L18">View Source</a>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/Http/ConnectRequest.cs/#L17">View Source</a>
</span>
<a id="Titanium_Web_Proxy_Http_ConnectRequest_TunnelType_" data-uid="Titanium.Web.Proxy.Http.ConnectRequest.TunnelType*"></a>
<h4 id="Titanium_Web_Proxy_Http_ConnectRequest_TunnelType" data-uid="Titanium.Web.Proxy.Http.ConnectRequest.TunnelType">TunnelType</h4>
......@@ -271,7 +271,7 @@
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/master/apiSpec/new?filename=Titanium_Web_Proxy_Http_ConnectRequest.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.Http.ConnectRequest%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
</li>
<li>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/Http/ConnectRequest.cs/#L10" class="contribution-link">View Source</a>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/Http/ConnectRequest.cs/#L9" class="contribution-link">View Source</a>
</li>
</ul>
</div>
......
......@@ -126,7 +126,7 @@
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/master/apiSpec/new?filename=Titanium_Web_Proxy_Http2_Hpack_HpackUtil_IndexType.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.Http2.Hpack.HpackUtil.IndexType%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
</li>
<li>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/Http2/Hpack/HpackUtil.cs/#L25" class="contribution-link">View Source</a>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/Http2/Hpack/HpackUtil.cs/#L23" class="contribution-link">View Source</a>
</li>
</ul>
</div>
......
......@@ -127,7 +127,7 @@
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/master/apiSpec/new?filename=Titanium_Web_Proxy_Http2_Hpack_HpackUtil_HuffmanCodeLengths.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.Http2.Hpack.HpackUtil.HuffmanCodeLengths%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/Http2/Hpack/HpackUtil.cs/#L294">View Source</a>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/Http2/Hpack/HpackUtil.cs/#L292">View Source</a>
</span>
<h4 id="Titanium_Web_Proxy_Http2_Hpack_HpackUtil_HuffmanCodeLengths" data-uid="Titanium.Web.Proxy.Http2.Hpack.HpackUtil.HuffmanCodeLengths">HuffmanCodeLengths</h4>
<div class="markdown level1 summary"></div>
......@@ -156,7 +156,7 @@
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/master/apiSpec/new?filename=Titanium_Web_Proxy_Http2_Hpack_HpackUtil_HuffmanCodes.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.Http2.Hpack.HpackUtil.HuffmanCodes%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/Http2/Hpack/HpackUtil.cs/#L34">View Source</a>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/Http2/Hpack/HpackUtil.cs/#L32">View Source</a>
</span>
<h4 id="Titanium_Web_Proxy_Http2_Hpack_HpackUtil_HuffmanCodes" data-uid="Titanium.Web.Proxy.Http2.Hpack.HpackUtil.HuffmanCodes">HuffmanCodes</h4>
<div class="markdown level1 summary"></div>
......@@ -185,7 +185,7 @@
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/master/apiSpec/new?filename=Titanium_Web_Proxy_Http2_Hpack_HpackUtil_HuffmanEos.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.Http2.Hpack.HpackUtil.HuffmanEos%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/Http2/Hpack/HpackUtil.cs/#L314">View Source</a>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/Http2/Hpack/HpackUtil.cs/#L312">View Source</a>
</span>
<h4 id="Titanium_Web_Proxy_Http2_Hpack_HpackUtil_HuffmanEos" data-uid="Titanium.Web.Proxy.Http2.Hpack.HpackUtil.HuffmanEos">HuffmanEos</h4>
<div class="markdown level1 summary"></div>
......@@ -220,7 +220,7 @@
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/master/apiSpec/new?filename=Titanium_Web_Proxy_Http2_Hpack_HpackUtil.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.Http2.Hpack.HpackUtil%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
</li>
<li>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/Http2/Hpack/HpackUtil.cs/#L22" class="contribution-link">View Source</a>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/Http2/Hpack/HpackUtil.cs/#L20" class="contribution-link">View Source</a>
</li>
</ul>
</div>
......
......@@ -298,7 +298,7 @@ Buffer size should be at least 10 bytes.</p>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Titanium.Web.Proxy.Network.CertificateManager.html">CertificateManager</a></td>
<td><span class="xref">CertificateManager</span></td>
<td></td>
</tr>
</tbody>
......
......@@ -191,19 +191,6 @@
</li>
</ul>
</li>
<li>
<span class="expand-stub"></span>
<a href="Titanium.Web.Proxy.Network.html" name="" title="Titanium.Web.Proxy.Network">Titanium.Web.Proxy.Network</a>
<ul class="nav level2">
<li>
<a href="Titanium.Web.Proxy.Network.CertificateEngine.html" name="" title="CertificateEngine">CertificateEngine</a>
</li>
<li>
<a href="Titanium.Web.Proxy.Network.CertificateManager.html" name="" title="CertificateManager">CertificateManager</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
......
This diff is collapsed.
This diff is collapsed.
......@@ -156,7 +156,11 @@ namespace Titanium.Web.Proxy.Examples.Basic
// this is just to show the functionality, provided values are junk
return new ExternalProxy
{
BypassLocalhost = false, HostName = "127.0.0.9", Port = 9090, Password = "fake", UserName = "fake",
BypassLocalhost = false,
HostName = "127.0.0.9",
Port = 9090,
Password = "fake",
UserName = "fake",
UseDefaultCredentials = false
};
}
......@@ -168,7 +172,11 @@ namespace Titanium.Web.Proxy.Examples.Basic
// this is just to show the functionality, provided values are junk
return new ExternalProxy
{
BypassLocalhost = false, HostName = "127.0.0.10", Port = 9191, Password = "fake2", UserName = "fake2",
BypassLocalhost = false,
HostName = "127.0.0.10",
Port = 9191,
Password = "fake2",
UserName = "fake2",
UseDefaultCredentials = false
};
}
......@@ -422,4 +430,3 @@ namespace Titanium.Web.Proxy.Examples.Basic
//}
}
}
using System;
using System.Text;
using System.Text;
namespace Titanium.Web.Proxy.Examples.Basic
{
......
......@@ -104,7 +104,7 @@ namespace Titanium.Web.Proxy.Examples.Wpf
Dispatcher.Invoke(() => { ServerConnectionCount = proxyServer.ServerConnectionCount; });
};
proxyServer.Start();
proxyServer.SetAsSystemProxy(explicitEndPoint, ProxyProtocolType.AllHttp);
InitializeComponent();
......@@ -279,7 +279,7 @@ namespace Titanium.Web.Proxy.Examples.Wpf
li.SentDataCount += args.Count;
//if (tunnelType == TunnelType.Http2)
AppendTransferLog( session.GetHashCode() + (isTunnelConnect ? "_tunnel" : "") + "_sent",
AppendTransferLog(session.GetHashCode() + (isTunnelConnect ? "_tunnel" : "") + "_sent",
args.Buffer, args.Offset, args.Count);
}
};
......
......@@ -162,7 +162,7 @@ namespace Titanium.Web.Proxy.Network.Certificate
const string password = "password";
Pkcs12Store store;
if(RunTime.IsRunningOnMono)
if (RunTime.IsRunningOnMono)
{
var builder = new Pkcs12StoreBuilder();
builder.SetUseDerEncoding(true);
......@@ -172,7 +172,7 @@ namespace Titanium.Web.Proxy.Network.Certificate
{
store = new Pkcs12Store();
}
var entry = new X509CertificateEntry(certificate);
store.SetCertificateEntry(certificate.SubjectDN.ToString(), entry);
......
......@@ -171,7 +171,7 @@ namespace Titanium.Web.Proxy.Network.Certificate
const string password = "password";
Pkcs12Store store;
if(RunTime.IsRunningOnMono)
if (RunTime.IsRunningOnMono)
{
var builder = new Pkcs12StoreBuilder();
builder.SetUseDerEncoding(true);
......@@ -181,7 +181,7 @@ namespace Titanium.Web.Proxy.Network.Certificate
{
store = new Pkcs12Store();
}
var entry = new X509CertificateEntry(certificate);
store.SetCertificateEntry(certificate.SubjectDN.ToString(), entry);
......
......@@ -12,7 +12,7 @@ namespace Titanium.Web.Proxy.Network
{
Certificate = certificate;
}
internal X509Certificate2 Certificate { get; }
/// <summary>
......
......@@ -25,7 +25,7 @@ namespace Titanium.Web.Proxy.Network
BouncyCastle = 0,
BouncyCastleFast = 2,
/// <summary>
/// Uses Windows Certification Generation API and only valid in Windows OS.
/// Observed to be faster than BouncyCastle.
......
using System;
using Titanium.Web.Proxy.Http;
using Titanium.Web.Proxy.Http;
namespace Titanium.Web.Proxy.Compression
{
......
using System;
namespace Titanium.Web.Proxy.Compression
namespace Titanium.Web.Proxy.Compression
{
internal enum HttpCompression
{
......
using System;
using System.Threading;
using System.Threading;
using Titanium.Web.Proxy.Network.Tcp;
namespace Titanium.Web.Proxy.EventArguments
......
using System;
using System.Security.Cryptography.X509Certificates;
using System.Security.Cryptography.X509Certificates;
namespace Titanium.Web.Proxy.EventArguments
{
......
using System;
using System.Net.Security;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
namespace Titanium.Web.Proxy.EventArguments
......
using System;
using Titanium.Web.Proxy.Network.Tcp;
using Titanium.Web.Proxy.Network.Tcp;
namespace Titanium.Web.Proxy.EventArguments
{
......
......@@ -20,7 +20,7 @@ namespace Titanium.Web.Proxy.EventArguments
internal LimitedStream(IHttpStreamReader baseStream, IBufferPool bufferPool, bool isChunked,
long contentLength)
{
{
this.baseReader = baseStream;
this.bufferPool = bufferPool;
this.isChunked = isChunked;
......
......@@ -25,7 +25,9 @@ namespace Titanium.Web.Proxy.EventArguments
/// </summary>
private bool reRequest;
private WebSocketDecoder? webSocketDecoder;
private WebSocketDecoder? webSocketDecoderSend;
private WebSocketDecoder? webSocketDecoderReceive;
/// <summary>
/// Is this session a HTTP/2 promise?
......@@ -59,7 +61,12 @@ namespace Titanium.Web.Proxy.EventArguments
}
}
public WebSocketDecoder WebSocketDecoder => webSocketDecoder ??= new WebSocketDecoder(BufferPool);
[Obsolete("Use [WebSocketDecoderReceive] instead")]
public WebSocketDecoder WebSocketDecoder => WebSocketDecoderReceive;
public WebSocketDecoder WebSocketDecoderSend => webSocketDecoderSend ??= new WebSocketDecoder(BufferPool);
public WebSocketDecoder WebSocketDecoderReceive => webSocketDecoderReceive ??= new WebSocketDecoder(BufferPool);
/// <summary>
/// Occurs when multipart request part sent.
......@@ -588,7 +595,7 @@ namespace Titanium.Web.Proxy.EventArguments
{
HttpClient.Request.Locked = true;
HttpClient.Request.CancelRequest = true;
// set new response.
HttpClient.Response = response;
HttpClient.Response.Locked = true;
......
......@@ -62,7 +62,7 @@ namespace Titanium.Web.Proxy.Extensions
}
}
internal static async Task<T> WithCancellation<T>(this Task<T> task, CancellationToken cancellationToken) where T : struct
internal static async Task<T> WithCancellation<T>(this Task<T> task, CancellationToken cancellationToken) where T : struct
{
var tcs = new TaskCompletionSource<bool>();
using (cancellationToken.Register(s => ((TaskCompletionSource<bool>)s).TrySetResult(true), tcs))
......
using System;
using System.Net.Sockets;
using System.Net.Sockets;
namespace Titanium.Web.Proxy.Extensions
{
......
using System;
using System.IO;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Titanium.Web.Proxy.Http;
......@@ -12,7 +11,7 @@ namespace Titanium.Web.Proxy.Helpers
{
public TcpClientConnection Connection { get; }
internal HttpClientStream(TcpClientConnection connection, Stream stream, IBufferPool bufferPool, CancellationToken cancellationToken)
internal HttpClientStream(TcpClientConnection connection, Stream stream, IBufferPool bufferPool, CancellationToken cancellationToken)
: base(stream, bufferPool, cancellationToken)
{
Connection = connection;
......@@ -27,10 +26,10 @@ namespace Titanium.Web.Proxy.Helpers
internal async ValueTask WriteResponseAsync(Response response, CancellationToken cancellationToken = default)
{
var headerBuilder = new HeaderBuilder();
// Write back response status to client
headerBuilder.WriteResponseLine(response.HttpVersion, response.StatusCode, response.StatusDescription);
await WriteAsync(response, headerBuilder, cancellationToken);
}
......
......@@ -9,6 +9,7 @@ using System.Threading;
using System.Threading.Tasks;
using Titanium.Web.Proxy.Compression;
using Titanium.Web.Proxy.EventArguments;
using Titanium.Web.Proxy.Exceptions;
using Titanium.Web.Proxy.Extensions;
using Titanium.Web.Proxy.Http;
using Titanium.Web.Proxy.Models;
......@@ -1017,7 +1018,7 @@ namespace Titanium.Web.Proxy.Helpers
string? contentEncoding = useOriginalHeaderValues ? requestResponse.OriginalContentEncoding : requestResponse.ContentEncoding;
Stream s = limitedStream = new LimitedStream(this, bufferPool, isChunked, contentLength);
if (transformation == TransformationMode.Uncompress && contentEncoding != null)
{
s = decompressStream = DecompressionFactory.Create(CompressionUtil.CompressionNameToEnum(contentEncoding), s);
......@@ -1102,13 +1103,16 @@ namespace Titanium.Web.Proxy.Helpers
return;
}
int idx = chunkHead.IndexOf(";");
int idx = chunkHead.IndexOf(";", StringComparison.Ordinal);
if (idx >= 0)
{
chunkHead = chunkHead.Substring(0, idx);
}
int chunkSize = int.Parse(chunkHead, NumberStyles.HexNumber);
if (!int.TryParse(chunkHead, NumberStyles.HexNumber, null, out int chunkSize))
{
throw new ProxyHttpException($"Invalid chunk length: '{chunkHead}'", null, null);
}
await writer.WriteLineAsync(chunkHead, cancellationToken);
......
......@@ -43,7 +43,7 @@
// RFC 4437: Web Distributed Authoring and Versioning (WebDAV): Redirect Reference Resources
Mkredirectref,
Updateredirectref,
// RFC 4791: Calendaring Extensions to WebDAV (CalDAV)
Mkcalendar,
......
......@@ -8,7 +8,7 @@ namespace Titanium.Web.Proxy
{
public static byte[] EmptyArray = new byte[0];
public static Task CompletedTask = new Task(() => { });
public static Task CompletedTask = Task.FromResult<object>(null);
}
}
#endif
......@@ -53,7 +53,7 @@ namespace Titanium.Web.Proxy.Helpers
}
try
{
{
// do reverse DNS lookup even if hostName is an IP address
var hostEntry = Dns.GetHostEntry(hostName);
// if DNS resolved hostname matches local DNS name,
......
......@@ -19,7 +19,7 @@ namespace Titanium.Web.Proxy.Helpers
public Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
{
#if NET45
return Net45Compatibility.CompletedTask;
return Net45Compatibility.CompletedTask;
#else
return Task.CompletedTask;
#endif
......
using System;
using System.Reflection;
using System.Text;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Text;
namespace Titanium.Web.Proxy.Helpers
{
......@@ -63,7 +63,7 @@ namespace Titanium.Web.Proxy.Helpers
public static bool IsUwpOnWindows => IsWindows && UwpHelper.IsRunningAsUwp();
public static bool IsMac => isRunningOnMac;
/// <summary>
/// Is socket reuse available to use?
/// </summary>
......
......@@ -130,7 +130,7 @@ namespace Titanium.Web.Proxy.Helpers
/// <param name="cancellationTokenSource"></param>
/// <param name="exceptionFunc"></param>
/// <returns></returns>
internal static Task SendRaw(Stream clientStream, Stream serverStream, IBufferPool bufferPool,
internal static Task SendRaw(Stream clientStream, Stream serverStream, IBufferPool bufferPool,
Action<byte[], int, int>? onDataSend, Action<byte[], int, int>? onDataReceive,
CancellationTokenSource cancellationTokenSource,
ExceptionHandler exceptionFunc)
......
using System;
using Titanium.Web.Proxy.Models;
using Titanium.Web.Proxy.Models;
using Titanium.Web.Proxy.StreamExtended;
namespace Titanium.Web.Proxy.Http
......
......@@ -145,7 +145,7 @@ namespace Titanium.Web.Proxy.Http
{
url = "/";
}
// prepare the request & headers
var headerBuilder = new HeaderBuilder();
headerBuilder.WriteRequestLine(Request.Method, url, Request.HttpVersion);
......
......@@ -210,7 +210,7 @@ namespace Titanium.Web.Proxy.Http
internal bool Locked { get; set; }
internal bool BodyAvailable => BodyInternal != null;
internal bool IsBodySent { get; set; }
internal abstract void EnsureBodyAvailable(bool throwWhenNotReadYet = true);
......
......@@ -103,7 +103,7 @@ namespace Titanium.Web.Proxy.Http2.Hpack
if (headerField != null)
{
int index = getIndex(headerField.Index) + StaticTable.Length;
// Section 6.1. Indexed Header Field Representation
encodeInteger(output, 0x80, 7, index);
}
......
......@@ -15,20 +15,19 @@
* limitations under the License.
*/
using System;
using Titanium.Web.Proxy.Models;
namespace Titanium.Web.Proxy.Http2.Hpack
{
internal interface IHeaderListener
{
/// <summary>
/// EmitHeader is called by the decoder during header field emission.
/// The name and value byte arrays must not be modified.
/// </summary>
/// <param name="name">Name.</param>
/// <param name="value">Value.</param>
/// <param name="sensitive">If set to <c>true</c> sensitive.</param>
void AddHeader(ByteString name, ByteString value, bool sensitive);
}
internal interface IHeaderListener
{
/// <summary>
/// EmitHeader is called by the decoder during header field emission.
/// The name and value byte arrays must not be modified.
/// </summary>
/// <param name="name">Name.</param>
/// <param name="value">Value.</param>
/// <param name="sensitive">If set to <c>true</c> sensitive.</param>
void AddHeader(ByteString name, ByteString value, bool sensitive);
}
}
......@@ -15,7 +15,6 @@
* limitations under the License.
*/
using System;
using System.Collections.Generic;
using Titanium.Web.Proxy.Models;
......@@ -32,7 +31,7 @@ namespace Titanium.Web.Proxy.Http2.Hpack
private static readonly Dictionary<ByteString, int> staticIndexByName;
public static ByteString KnownHeaderAuhtority = (ByteString)":authority";
public static ByteString KnownHeaderMethod = (ByteString)":method";
public static ByteString KnownHeaderPath = (ByteString)":path";
......@@ -109,11 +108,11 @@ namespace Titanium.Web.Proxy.Http2.Hpack
create("WWW-Authenticate", string.Empty); // 61
}
/// <summary>
/// The number of header fields in the static table.
/// </summary>
/// <value>The length.</value>
public static int Length => staticTable.Count;
/// <summary>
/// The number of header fields in the static table.
/// </summary>
/// <value>The length.</value>
public static int Length => staticTable.Count;
/// <summary>
/// Return the http header field at the given index value.
......
......@@ -43,12 +43,12 @@ namespace Titanium.Web.Proxy.Http2
// Now async relay all server=>client & client=>server data
var sendRelay =
copyHttp2FrameAsync(clientStream, serverStream, clientSettings, serverSettings,
sessionFactory, sessions, onBeforeRequest,
copyHttp2FrameAsync(clientStream, serverStream, clientSettings, serverSettings,
sessionFactory, sessions, onBeforeRequest,
connectionId, true, cancellationTokenSource.Token, exceptionFunc);
var receiveRelay =
copyHttp2FrameAsync(serverStream, clientStream, serverSettings, clientSettings,
sessionFactory, sessions, onBeforeResponse,
copyHttp2FrameAsync(serverStream, clientStream, serverSettings, clientSettings,
sessionFactory, sessions, onBeforeResponse,
connectionId, false, cancellationTokenSource.Token, exceptionFunc);
await Task.WhenAny(sendRelay, receiveRelay);
......@@ -59,7 +59,7 @@ namespace Titanium.Web.Proxy.Http2
private static async Task copyHttp2FrameAsync(Stream input, Stream output,
Http2Settings localSettings, Http2Settings remoteSettings,
Func<SessionEventArgs> sessionFactory, ConcurrentDictionary<int, SessionEventArgs> sessions,
Func<SessionEventArgs> sessionFactory, ConcurrentDictionary<int, SessionEventArgs> sessions,
Func<SessionEventArgs, Task> onBeforeRequestResponse,
Guid connectionId, bool isClient, CancellationToken cancellationToken,
ExceptionHandler exceptionFunc)
......@@ -81,7 +81,7 @@ namespace Titanium.Web.Proxy.Http2
int length = (frameHeaderBuffer[0] << 16) + (frameHeaderBuffer[1] << 8) + frameHeaderBuffer[2];
var type = (Http2FrameType)frameHeaderBuffer[3];
var flags = (Http2FrameFlag)frameHeaderBuffer[4];
int streamId = ((frameHeaderBuffer[5] & 0x7f) << 24) + (frameHeaderBuffer[6] << 16) +
int streamId = ((frameHeaderBuffer[5] & 0x7f) << 24) + (frameHeaderBuffer[6] << 16) +
(frameHeaderBuffer[7] << 8) + frameHeaderBuffer[8];
frameHeader.Length = length;
......@@ -129,7 +129,7 @@ namespace Titanium.Web.Proxy.Http2
//System.Diagnostics.Debug.WriteLine("CONN: " + connectionId + ", CLIENT: " + isClient + ", STREAM: " + streamId + ", TYPE: " + type);
if (type == Http2FrameType.Data && args != null)
{
if (isClient)
if (isClient)
args.OnDataSent(buffer, 0, read);
else
args.OnDataReceived(buffer, 0, read);
......
......@@ -85,7 +85,7 @@ namespace Titanium.Web.Proxy.Models
/// <param name="port">The port.</param>
public ExternalProxy(string hostName, int port)
{
HostName = hostName;
HostName = hostName;
Port = port;
}
......@@ -115,7 +115,7 @@ namespace Titanium.Web.Proxy.Models
}
public enum ExternalProxyType
{
{
/// <summary>A HTTP/HTTPS proxy server.</summary>
Http,
......
......@@ -58,7 +58,7 @@ namespace Titanium.Web.Proxy.Models
nameString = name.Trim();
NameData = nameString.GetByteString();
valueString = value.Trim();
ValueData = valueString.GetByteString();
}
......
using System;
using System.Net;
using System.Net;
using System.Threading.Tasks;
using Titanium.Web.Proxy.EventArguments;
......
......@@ -45,7 +45,7 @@ namespace Titanium.Web.Proxy.Network
}
catch (Exception ex)
{
{
exception = ex;
}
......@@ -59,7 +59,7 @@ namespace Titanium.Web.Proxy.Network
}
exception = null;
await disposeConnection();
await disposeConnection();
}
return new RetryResult(currentConnection, exception, @continue);
......@@ -80,9 +80,9 @@ namespace Titanium.Web.Proxy.Network
internal class RetryResult
{
internal TcpServerConnection? LatestConnection { get; }
internal Exception? Exception { get; }
internal bool Continue { get; }
internal RetryResult(TcpServerConnection? lastConnection, Exception? exception, bool @continue)
......
......@@ -85,7 +85,7 @@ namespace Titanium.Web.Proxy.Network.Tcp
// This way we can push tcp Time_Wait to client side when possible.
await Task.Delay(1000);
proxyServer.UpdateClientConnectionCount(false);
try
{
tcpClientSocket.Close();
......
......@@ -59,7 +59,7 @@ namespace Titanium.Web.Proxy.Network.Tcp
cacheKeyBuilder.Append("-");
cacheKeyBuilder.Append(remotePort);
cacheKeyBuilder.Append("-");
// when creating Tcp client isConnect won't matter
cacheKeyBuilder.Append(isHttps);
......@@ -382,7 +382,7 @@ retry:
proxySocket.ProxyUser = externalProxy.UserName;
proxySocket.ProxyPass = externalProxy.Password;
}
tcpServerSocket = proxySocket;
}
else
......@@ -744,7 +744,7 @@ retry:
{
((Socket)asyncResult.AsyncState).EndConnect(asyncResult);
}
public static Task CreateTask(Socket socket, IPAddress ipAddress, int port)
{
return Task.Factory.FromAsync(beginConnect, endConnect, ipAddress, port, state: socket);
......
......@@ -97,7 +97,7 @@ namespace Titanium.Web.Proxy.Network.Tcp
await Task.Delay(1000);
proxyServer.UpdateServerConnectionCount(false);
Stream.Dispose();
try
{
TcpSocket.Close();
......
......@@ -61,7 +61,7 @@ namespace Titanium.Web.Proxy.Network.WinAuth.Security
out clientToken,
out NewContextAttributes,
out NewLifeTime);
if (result != IntermediateResult)
{
return null;
......
using System.Reflection;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
......@@ -11,7 +11,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Titanium.Web.Proxy")]
[assembly: AssemblyCopyright("Copyright Titanium 2015-2019")]
[assembly: AssemblyCopyright("Copyright © Titanium 2015-2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: InternalsVisibleTo("Titanium.Web.Proxy.UnitTests, PublicKey=" +
......
......@@ -156,7 +156,7 @@ namespace Titanium.Web.Proxy
response.Headers.AddHeader(KnownHeaders.ProxyAuthenticate, continuation);
response.Headers.AddHeader(KnownHeaders.ProxyConnection, KnownHeaders.ConnectionKeepAlive);
response.Headers.FixProxyHeaders();
return response;
......
......@@ -28,7 +28,6 @@
OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Net.Sockets;
namespace Titanium.Web.Proxy.ProxySocket.Authentication
......
......@@ -152,7 +152,7 @@ namespace Titanium.Web.Proxy.ProxySocket.Authentication
int recv = Server.EndReceive(ar);
if (recv <= 0)
throw new SocketException(10054);
Received += recv;
if (Received == 2)
if (Buffer[1] == 0)
......
......@@ -136,10 +136,10 @@ namespace Titanium.Web.Proxy.ProxySocket
{
if (host == null)
throw new ArgumentNullException();
if (port <= 0 || port > 65535 || host.Length > 255)
throw new ArgumentException();
byte[] buffer = GetConnectBytes(host, port);
if (Server.Send(buffer, 0, buffer.Length, SocketFlags.None) < buffer.Length)
{
......
......@@ -90,7 +90,7 @@ namespace Titanium.Web.Proxy.ProxySocket
ReadBytes(buffer, 2);
if (buffer[1] == 255)
throw new ProxyException("No authentication method accepted.");
AuthMethod authenticate;
switch (buffer[1])
{
......@@ -120,7 +120,7 @@ namespace Titanium.Web.Proxy.ProxySocket
{
if (host == null)
throw new ArgumentNullException();
if (port <= 0 || port > 65535 || host.Length > 255)
throw new ArgumentException();
......@@ -206,7 +206,7 @@ namespace Titanium.Web.Proxy.ProxySocket
try
{
Authenticate(buffer);
int length = GetEndPointBytes(remoteEP, buffer);
Negotiate(buffer, length);
}
......
......@@ -121,7 +121,7 @@ namespace Titanium.Web.Proxy.ProxySocket
int recv = Server.EndReceive(ar);
if (recv <= 0)
throw new SocketException(10054);
Received += recv;
}
......
......@@ -33,7 +33,7 @@ namespace Titanium.Web.Proxy
/// <param name="connectArgs">The Connect request if this is a HTTPS request from explicit endpoint.</param>
/// <param name="prefetchConnectionTask">Prefetched server connection for current client using Connect/SNI headers.</param>
/// <param name="isHttps">Is HTTPS</param>
private async Task handleHttpSessionRequest(ProxyEndPoint endPoint, HttpClientStream clientStream,
private async Task handleHttpSessionRequest(ProxyEndPoint endPoint, HttpClientStream clientStream,
CancellationTokenSource cancellationTokenSource, TunnelConnectSessionEventArgs? connectArgs = null,
Task<TcpServerConnection>? prefetchConnectionTask = null, bool isHttps = false)
{
......@@ -50,7 +50,7 @@ namespace Titanium.Web.Proxy
// Loop through each subsequent request on this particular client connection
// (assuming HTTP connection is kept alive by client)
while (true)
{
{
if (clientStream.IsClosed)
{
return;
......@@ -152,7 +152,7 @@ namespace Titanium.Web.Proxy
}
catch (SocketException e)
{
if(e.SocketErrorCode != SocketError.HostNotFound)
if (e.SocketErrorCode != SocketError.HostNotFound)
{
throw;
}
......@@ -336,7 +336,7 @@ namespace Titanium.Web.Proxy
headerBuilder.WriteResponseLine(response.HttpVersion, response.StatusCode, response.StatusDescription);
headerBuilder.WriteHeaders(response.Headers);
await writer.WriteHeadersAsync(headerBuilder, cancellationToken);
await args.ClearResponse(cancellationToken);
}
......
......@@ -135,8 +135,8 @@ namespace Titanium.Web.Proxy.StreamExtended
if (CompressionData != null && CompressionData.Length > 0)
{
int compressionMethod = CompressionData[0];
string compression = compressions.Length > compressionMethod
? compressions[compressionMethod]
string compression = compressions.Length > compressionMethod
? compressions[compressionMethod]
: $"unknown [0x{compressionMethod:X2}]";
sb.AppendLine($"Compression: {compression}");
}
......
using System;
using System.Threading;
using System.Threading;
using System.Threading.Tasks;
namespace Titanium.Web.Proxy.StreamExtended.Network
......
using System;
using System.Threading;
using System.Threading;
using System.Threading.Tasks;
namespace Titanium.Web.Proxy.StreamExtended.Network
......@@ -52,5 +51,5 @@ namespace Titanium.Web.Proxy.StreamExtended.Network
return buffer;
}
}
}
}
......@@ -105,8 +105,8 @@ namespace Titanium.Web.Proxy.StreamExtended
}
}
string compression = compressions.Length > CompressionMethod
? compressions[CompressionMethod]
string compression = compressions.Length > CompressionMethod
? compressions[CompressionMethod]
: $"unknown [0x{CompressionMethod:X2}]";
sb.AppendLine($"Compression: {compression}");
......
......@@ -151,7 +151,7 @@ namespace Titanium.Web.Proxy.StreamExtended
Dictionary<string, SslExtension>? extensions = null;
if(extensionsStartPosition < recordLength + 5)
if (extensionsStartPosition < recordLength + 5)
{
extensions = await ReadExtensions(majorVersion, minorVersion, peekStream, cancellationToken);
}
......@@ -291,7 +291,7 @@ namespace Titanium.Web.Proxy.StreamExtended
if (extensionsStartPosition < recordLength + 5)
{
extensions = await ReadExtensions(majorVersion, minorVersion, peekStream, cancellationToken);
extensions = await ReadExtensions(majorVersion, minorVersion, peekStream, cancellationToken);
}
var serverHelloInfo = new ServerHelloInfo(3, majorVersion, minorVersion, random, sessionId, cipherSuite, peekStream.Position)
......
......@@ -90,7 +90,7 @@ namespace Titanium.Web.Proxy
}
else
{
var sessionArgs = new SessionEventArgs(this, endPoint, clientStream, null, cancellationTokenSource);
var sessionArgs = new SessionEventArgs(this, endPoint, clientStream, null, cancellationTokenSource);
var connection = await tcpConnectionFactory.GetServerConnection(this, httpsHostName, port,
HttpHeader.VersionUnknown, false, null,
true, sessionArgs, UpStreamEndPoint,
......
......@@ -42,7 +42,7 @@ namespace Titanium.Web.Proxy
long size = b & 0x7f;
// todo: size > int.Max??
bool masked = (b & 0x80) != 0;
int idx = 2;
......@@ -100,7 +100,7 @@ namespace Titanium.Web.Proxy
{
data1[pos + 2] ^= (byte)(mask >> 16);
}
; }
}
}
var frameData = buffer.Slice(idx, (int)size);
......@@ -114,6 +114,19 @@ namespace Titanium.Web.Proxy
{
copyToBuffer(buffer);
}
if (copied)
{
if (buffer.Length == 0)
{
bufferLength = 0;
}
else
{
buffer.CopyTo(this.buffer);
bufferLength = buffer.Length;
}
}
}
private Memory<byte> copyToBuffer(ReadOnlyMemory<byte> data)
......
......@@ -6,7 +6,7 @@ namespace Titanium.Web.Proxy
public class WebSocketFrame
{
public bool IsFinal { get; internal set; }
public WebsocketOpCode OpCode { get; internal set; }
public ReadOnlyMemory<byte> Data { get; internal set; }
......
using System;
using System.Threading;
using System.Threading;
using System.Threading.Tasks;
using Titanium.Web.Proxy.EventArguments;
using Titanium.Web.Proxy.Helpers;
......@@ -21,7 +20,7 @@ namespace Titanium.Web.Proxy
await serverConnection.Stream.WriteRequestAsync(args.HttpClient.Request, cancellationToken);
var httpStatus = await serverConnection.Stream.ReadResponseStatus(cancellationToken);
var response = args.HttpClient.Response;
response.HttpVersion = httpStatus.Version;
response.StatusCode = httpStatus.StatusCode;
......
......@@ -27,7 +27,9 @@ namespace Titanium.Web.Proxy.IntegrationTests.Helpers
Request.ParseRequestLine(line, out var method, out var url, out var version);
var request = new Request
{
Method = method, RequestUriString8 = url, HttpVersion = version
Method = method,
RequestUriString8 = url,
HttpVersion = version
};
while (!string.IsNullOrEmpty(line = reader.ReadLine()))
{
......@@ -72,7 +74,9 @@ namespace Titanium.Web.Proxy.IntegrationTests.Helpers
Response.ParseResponseLine(line, out var version, out var status, out var desc);
var response = new Response
{
HttpVersion = version, StatusCode = status, StatusDescription = desc
HttpVersion = version,
StatusCode = status,
StatusDescription = desc
};
while (!string.IsNullOrEmpty(line = reader.ReadLine()))
......@@ -107,7 +111,7 @@ namespace Titanium.Web.Proxy.IntegrationTests.Helpers
}
obj.Body = Encoding.ASCII.GetBytes(reader.ReadToEnd());
// done reading body
return obj.ContentLength == obj.OriginalContentLength;
}
......
......@@ -14,7 +14,7 @@ namespace Titanium.Web.Proxy.IntegrationTests.Helpers
var handler = new HttpClientHandler
{
Proxy = proxy,
UseProxy = true
UseProxy = true
};
return new HttpClient(handler);
......
......@@ -72,7 +72,7 @@ namespace Titanium.Web.Proxy.IntegrationTests
var client = testSuite.GetClient(proxy);
var response = await client.PostAsync(new Uri(server.ListeningHttpUrl),
var response = await client.PostAsync(new Uri(server.ListeningHttpUrl),
new StringContent("hello server. I am a client."));
Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
......
using Microsoft.AspNetCore;
using System;
using System.Linq;
using System.Net;
using System.Security.Cryptography.X509Certificates;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Connections;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Hosting.Server.Features;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Linq;
using System.Net;
using System.Security.Cryptography.X509Certificates;
using System.Threading.Tasks;
namespace Titanium.Web.Proxy.IntegrationTests.Setup
{
......
using System;
using System.Net.Http;
using System.Net.Http;
using Titanium.Web.Proxy.IntegrationTests.Helpers;
using Titanium.Web.Proxy.IntegrationTests.Setup;
......
......@@ -18,6 +18,7 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.0.0" />
<PackageReference Include="MSTest.TestFramework" Version="2.0.0" />
<PackageReference Include="System.IO.Pipelines" Version="4.7.1" />
</ItemGroup>
<ItemGroup>
......
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Titanium.Web.Proxy.Network;
namespace Titanium.Web.Proxy.UnitTests
......
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Net;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Titanium.Web.Proxy.Models;
namespace Titanium.Web.Proxy.UnitTests
......
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Net;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Titanium.Web.Proxy.Helpers;
using Titanium.Web.Proxy.Helpers.WinHttp;
using Titanium.Web.Proxy.Models;
......
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Titanium.Web.Proxy.Http;
using Titanium.Web.Proxy.Network.WinAuth;
......
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