justcoding121 / titanium-web-proxy

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

Self-signed server connect problem. #831

Open ljh1991125 opened 3 years ago

ljh1991125 commented 3 years ago

Hello!

I am using titanium proxy as local proxy. My environment is like following.

My server is https and it uses self-signed certificate. So i installed server's self-signed certificate to client pc's certificate manager. (I installed at "Trusted Root Certification Authorities") Certmgr

Without titanium proxy i can connect my server using https without any security warning. But when i use titanium proxy it causes security warning and certificate is like this. The certificate the root is [Titanium Root Certificate Authority] and domain name(in my case it is ip address) is different.

How can i solve this problem.

IE Certificate

Thank you for your help.

justcoding121 commented 3 years ago

If server is using self-signed certificate, it is going to throw error during SSL verification on proxy. To accept self-signed certificate you need to ignore verification error in the proxy. You can do that as shown in below line on example project.

https://github.com/justcoding121/Titanium-Web-Proxy/blob/develop/examples/Titanium.Web.Proxy.Examples.Basic/ProxyTestController.cs#L388 Set e.IsValid = true when it has error.