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

Commit

Permalink
Merge branch 'beta' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
justcoding121 committed Aug 18, 2021
2 parents 388fd0e + 6e995d6 commit 17432b0
Show file tree
Hide file tree
Showing 97 changed files with 1,813 additions and 801 deletions.
43 changes: 24 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ A lightweight HTTP(S) proxy server written in C#.

Report bugs or raise issues here. For programming help use [StackOverflow](http://stackoverflow.com/questions/tagged/titanium-web-proxy) with the tag Titanium-Web-Proxy.

* [API Documentation](https://justcoding121.github.io/Titanium-Web-Proxy/docs/api/Titanium.Web.Proxy.ProxyServer.html)
* [API Documentation](https://justcoding121.github.io/titanium-web-proxy/docs/api/Titanium.Web.Proxy.ProxyServer.html)
* [Wiki & Contribution guidelines](https://github.com/justcoding121/Titanium-Web-Proxy/wiki)

### Features

* Multi-threaded fully asynchronous proxy employing server connection pooling, certificate cache, and buffer pooling
* View/modify/redirect/block requests and responses
* Multithreaded and asynchronous proxy employing server connection pooling, certificate cache, and buffer pooling
* View, modify, redirect and block requests or responses
* Supports mutual SSL authentication, proxy authentication & automatic upstream proxy detection
* Kerberos/NTLM authentication over HTTP protocols for windows domain
* Supports kerberos, NTLM authentication over HTTP protocols on windows domain controlled networks
* SOCKS4/5 Proxy support

### Installation
Expand All @@ -32,6 +32,21 @@ Supports

* .NET Standard 2.0 or above
* .NET Framework 4.5 or above

### Note to contributors

#### Road map

* Fix [outstanding bugs](https://github.com/justcoding121/Titanium-Web-Proxy/issues?q=is%3Aopen+is%3Aissue+label%3Abug)
* Support reading request and response body as stream [#823](https://github.com/justcoding121/Titanium-Web-Proxy/issues/823)
* Stop throwing new exceptions [#634](https://github.com/justcoding121/Titanium-Web-Proxy/issues/634)
* Support HTTP 2.0

#### Collaborators

The owner of this project, [justcoding121](https://github.com/justcoding121), is considered to be inactive from this project due to his busy work schedule. However, we have a collaborator listed below who time and again shows up to maintain this project. Please create pull requests prioritizing bug fixes for the attention of collaborators.

* [honfika](https://github.com/honfika)

### Development environment

Expand All @@ -57,7 +72,7 @@ Setup HTTP proxy:
var proxyServer = new ProxyServer();

// locally trust root certificate used by this proxy
proxyServer.CertificateManager.TrustRootCertificate = true;
proxyServer.CertificateManager.TrustRootCertificate(true);

// optionally set the Certificate Engine
// Under Mono only BouncyCastle will be supported
Expand Down Expand Up @@ -150,11 +165,11 @@ public async Task OnRequest(object sender, SessionEventArgs e)
{
// Get/Set request body bytes
byte[] bodyBytes = await e.GetRequestBody();
await e.SetRequestBody(bodyBytes);
e.SetRequestBody(bodyBytes);

// Get/Set request body as string
string bodyString = await e.GetRequestBodyAsString();
await e.SetRequestBodyString(bodyString);
e.SetRequestBodyString(bodyString);

// store request
// so that you can find it from response handler
Expand Down Expand Up @@ -195,10 +210,10 @@ public async Task OnResponse(object sender, SessionEventArgs e)
if (e.HttpClient.Response.ContentType != null && e.HttpClient.Response.ContentType.Trim().ToLower().Contains("text/html"))
{
byte[] bodyBytes = await e.GetResponseBody();
await e.SetResponseBody(bodyBytes);
e.SetResponseBody(bodyBytes);

string body = await e.GetResponseBodyAsString();
await e.SetResponseBodyString(body);
e.SetResponseBodyString(body);
}
}
}
Expand Down Expand Up @@ -227,16 +242,6 @@ public Task OnCertificateSelection(object sender, CertificateSelectionEventArgs
return Task.CompletedTask;
}
```
### Note to contributors

#### Road map

* Support HTTP 2.0

#### Collaborators

* [honfika](https://github.com/honfika)


**Console example application screenshot**

Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ environment:
github_email:
secure: iBJZGqxyiHVNeYI0uIW+MdGd3I3pg8brJtETNRkKe/A=
nuget_access_token:
secure: 65rklofkoUWJzPPja621kXlxrruHemmbREnIX7QgXK0cydW412yYMZJQsN42Js27
secure: OO7/GRKfrScfh1Z92UxFEuBuXUM0WlPv2RMzCL6WnYAMByhiyWC2e1ezy34r/Lc6
deploy:
- provider: GitHub
auth_token: $(github_access_token)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ <h5 class="typeParameters">Type Parameters</h5>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/develop/apiSpec/new?filename=Titanium_Web_Proxy_EventArguments_AsyncEventHandler_1.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.EventArguments.AsyncEventHandler%601%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/develop/src/Titanium.Web.Proxy/EventArguments/AsyncEventHandler.cs/#L12" class="contribution-link">View Source</a>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/develop/src/Titanium.Web.Proxy/AsyncEventHandler.cs/#L12" class="contribution-link">View Source</a>
</li>
</ul>
</div>
Expand Down
48 changes: 41 additions & 7 deletions docs/api/Titanium.Web.Proxy.EventArguments.SessionEventArgs.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ <h5>Inherited Members</h5>
<div>
<a class="xref" href="Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.html#Titanium_Web_Proxy_EventArguments_SessionEventArgsBase_Exception">SessionEventArgsBase.Exception</a>
</div>
<div>
<a class="xref" href="Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.html#Titanium_Web_Proxy_EventArguments_SessionEventArgsBase_Dispose">SessionEventArgsBase.Dispose()</a>
</div>
<div>
<a class="xref" href="Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.html#Titanium_Web_Proxy_EventArguments_SessionEventArgsBase_DataSent">SessionEventArgsBase.DataSent</a>
</div>
Expand Down Expand Up @@ -365,22 +368,53 @@ <h3 id="methods">Methods
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/develop/apiSpec/new?filename=Titanium_Web_Proxy_EventArguments_SessionEventArgs_Dispose.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.EventArguments.SessionEventArgs.Dispose%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>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/develop/apiSpec/new?filename=Titanium_Web_Proxy_EventArguments_SessionEventArgs_Dispose_System_Boolean_.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.EventArguments.SessionEventArgs.Dispose(System.Boolean)%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/develop/src/Titanium.Web.Proxy/EventArguments/SessionEventArgs.cs/#L671">View Source</a>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/develop/src/Titanium.Web.Proxy/EventArguments/SessionEventArgs.cs/#L669">View Source</a>
</span>
<a id="Titanium_Web_Proxy_EventArguments_SessionEventArgs_Dispose_" data-uid="Titanium.Web.Proxy.EventArguments.SessionEventArgs.Dispose*"></a>
<h4 id="Titanium_Web_Proxy_EventArguments_SessionEventArgs_Dispose" data-uid="Titanium.Web.Proxy.EventArguments.SessionEventArgs.Dispose">Dispose()</h4>
<div class="markdown level1 summary"><p>Implement any cleanup here</p>
</div>
<h4 id="Titanium_Web_Proxy_EventArguments_SessionEventArgs_Dispose_System_Boolean_" data-uid="Titanium.Web.Proxy.EventArguments.SessionEventArgs.Dispose(System.Boolean)">Dispose(Boolean)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public override void Dispose()</code></pre>
<pre><code class="lang-csharp hljs">protected override void Dispose(bool disposing)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
<td><span class="parametername">disposing</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.html#Titanium_Web_Proxy_EventArguments_SessionEventArgsBase_Dispose">SessionEventArgsBase.Dispose()</a></div>
<div><a class="xref" href="Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.html#Titanium_Web_Proxy_EventArguments_SessionEventArgsBase_Dispose_System_Boolean_">SessionEventArgsBase.Dispose(Boolean)</a></div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/develop/apiSpec/new?filename=Titanium_Web_Proxy_EventArguments_SessionEventArgs_Finalize.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.EventArguments.SessionEventArgs.Finalize%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/develop/src/Titanium.Web.Proxy/EventArguments/SessionEventArgs.cs/#L682">View Source</a>
</span>
<a id="Titanium_Web_Proxy_EventArguments_SessionEventArgs_Finalize_" data-uid="Titanium.Web.Proxy.EventArguments.SessionEventArgs.Finalize*"></a>
<h4 id="Titanium_Web_Proxy_EventArguments_SessionEventArgs_Finalize" data-uid="Titanium.Web.Proxy.EventArguments.SessionEventArgs.Finalize">Finalize()</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">protected void Finalize()</code></pre>
</div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/develop/apiSpec/new?filename=Titanium_Web_Proxy_EventArguments_SessionEventArgs_GenericResponse_System_Byte___System_Net_HttpStatusCode_System_Collections_Generic_IDictionary_System_String_Titanium_Web_Proxy_Models_HttpHeader__System_Boolean_.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.EventArguments.SessionEventArgs.GenericResponse(System.Byte%5B%5D%2CSystem.Net.HttpStatusCode%2CSystem.Collections.Generic.IDictionary%7BSystem.String%2CTitanium.Web.Proxy.Models.HttpHeader%7D%2CSystem.Boolean)%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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -765,23 +765,69 @@ <h3 id="methods">Methods
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/develop/apiSpec/new?filename=Titanium_Web_Proxy_EventArguments_SessionEventArgsBase_Dispose.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.Dispose%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/develop/src/Titanium.Web.Proxy/EventArguments/SessionEventArgsBase.cs/#L156">View Source</a>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/develop/src/Titanium.Web.Proxy/EventArguments/SessionEventArgsBase.cs/#L177">View Source</a>
</span>
<a id="Titanium_Web_Proxy_EventArguments_SessionEventArgsBase_Dispose_" data-uid="Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.Dispose*"></a>
<h4 id="Titanium_Web_Proxy_EventArguments_SessionEventArgsBase_Dispose" data-uid="Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.Dispose">Dispose()</h4>
<div class="markdown level1 summary"><p>Implements cleanup here.</p>
</div>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Dispose()</code></pre>
</div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/develop/apiSpec/new?filename=Titanium_Web_Proxy_EventArguments_SessionEventArgsBase_Dispose_System_Boolean_.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.Dispose(System.Boolean)%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/develop/src/Titanium.Web.Proxy/EventArguments/SessionEventArgsBase.cs/#L155">View Source</a>
</span>
<a id="Titanium_Web_Proxy_EventArguments_SessionEventArgsBase_Dispose_" data-uid="Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.Dispose*"></a>
<h4 id="Titanium_Web_Proxy_EventArguments_SessionEventArgsBase_Dispose_System_Boolean_" data-uid="Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.Dispose(System.Boolean)">Dispose(Boolean)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">protected virtual void Dispose(bool disposing)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
<td><span class="parametername">disposing</span></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/develop/apiSpec/new?filename=Titanium_Web_Proxy_EventArguments_SessionEventArgsBase_Finalize.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.Finalize%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/develop/src/Titanium.Web.Proxy/EventArguments/SessionEventArgsBase.cs/#L183">View Source</a>
</span>
<a id="Titanium_Web_Proxy_EventArguments_SessionEventArgsBase_Finalize_" data-uid="Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.Finalize*"></a>
<h4 id="Titanium_Web_Proxy_EventArguments_SessionEventArgsBase_Finalize" data-uid="Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.Finalize">Finalize()</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public virtual void Dispose()</code></pre>
<pre><code class="lang-csharp hljs">protected void Finalize()</code></pre>
</div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/develop/apiSpec/new?filename=Titanium_Web_Proxy_EventArguments_SessionEventArgsBase_TerminateSession.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.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/develop/src/Titanium.Web.Proxy/EventArguments/SessionEventArgsBase.cs/#L204">View Source</a>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/develop/src/Titanium.Web.Proxy/EventArguments/SessionEventArgsBase.cs/#L225">View Source</a>
</span>
<a id="Titanium_Web_Proxy_EventArguments_SessionEventArgsBase_TerminateSession_" data-uid="Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.TerminateSession*"></a>
<h4 id="Titanium_Web_Proxy_EventArguments_SessionEventArgsBase_TerminateSession" data-uid="Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.TerminateSession">TerminateSession()</h4>
Expand All @@ -799,7 +845,7 @@ <h3 id="events">Events
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/develop/apiSpec/new?filename=Titanium_Web_Proxy_EventArguments_SessionEventArgsBase_DataReceived.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.DataReceived%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/develop/src/Titanium.Web.Proxy/EventArguments/SessionEventArgsBase.cs/#L175">View Source</a>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/develop/src/Titanium.Web.Proxy/EventArguments/SessionEventArgsBase.cs/#L196">View Source</a>
</span>
<h4 id="Titanium_Web_Proxy_EventArguments_SessionEventArgsBase_DataReceived" data-uid="Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.DataReceived">DataReceived</h4>
<div class="markdown level1 summary"><p>Fired when data is received within this session from client/server.</p>
Expand Down Expand Up @@ -829,7 +875,7 @@ <h5 class="eventType">Event Type</h5>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/new/develop/apiSpec/new?filename=Titanium_Web_Proxy_EventArguments_SessionEventArgsBase_DataSent.md&amp;value=---%0Auid%3A%20Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.DataSent%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/develop/src/Titanium.Web.Proxy/EventArguments/SessionEventArgsBase.cs/#L170">View Source</a>
<a href="https://github.com/justcoding121/Titanium-Web-Proxy/blob/develop/src/Titanium.Web.Proxy/EventArguments/SessionEventArgsBase.cs/#L191">View Source</a>
</span>
<h4 id="Titanium_Web_Proxy_EventArguments_SessionEventArgsBase_DataSent" data-uid="Titanium.Web.Proxy.EventArguments.SessionEventArgsBase.DataSent">DataSent</h4>
<div class="markdown level1 summary"><p>Fired when data is sent within this session to server/client.</p>
Expand Down
Loading

0 comments on commit 17432b0

Please sign in to comment.