justcoding121 / titanium-web-proxy

A cross-platform asynchronous HTTP(S) proxy server in C#.
MIT License
1.93k stars 618 forks source link

Mutual TLS authentication ,please provide instructions or guide ? #790

Closed mrs01dev closed 3 years ago

mrs01dev commented 4 years ago

Regarding mutual TLS authentication, Could brilliant developer provide instructions or guide or sample code to implement the following : Two cascade Titanium Web Proxy in two different geographical locations ,communication between the two Titanium Web Proxy using TLS1.2. the idea , first Titanium Web Proxy will take web traffic from old windows XP, forward it to second Titanium Web Proxy. Thanks.

mrs01dev commented 4 years ago

From "examples/Titanium.Web.Proxy.Examples.Basic/ProxyTestController.cs" the code for utilizing a second Titanium Web Proxy are: //proxyServer.ForwardToUpstreamGateway = true; //proxyServer.AddEndPoint(transparentEndPoint); //proxyServer.UpStreamHttpProxy = new ExternalProxy("localhost", 8888); //proxyServer.UpStreamHttpsProxy = new ExternalProxy("localhost", 8888); my issue is to ensure mutual TLS authentication and load custom certificate on both Titanium Web Proxy

justcoding121 commented 3 years ago

You need to provide the client certificate to the server. We cannot forward client certificates from proxy clients, because the man-in-middle attack is not possible.

https://github.com/justcoding121/titanium-web-proxy/blob/a500d06d57a0eaf4512b1da040af483e197a13eb/tests/Titanium.Web.Proxy.IntegrationTests/HttpsTests.cs#L81-L85