justcoding121 / titanium-web-proxy

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

Certificate Issue for Particular Websites #761

Closed surendharb closed 4 years ago

surendharb commented 4 years ago

Recently I was navigating this particular website https://www.iditect.com/ using titanium Proxy. For some reason this website was not loaded, Then I browsed without Titanium this website was opening. I found this issue through crome. image

I think the problem is with the certificate what we creating.

I there anyway to skip issuing certificate and allow with load their own certificates, if any problem occurs.

honfika commented 4 years ago

This problem shuold be fixed in the latest package with enabled ssl decryption.

I there anyway to skip issuing certificate and allow with load their own certificates, if any problem occurs.

Yes, you can always disable the SSL decryption for any particular website with the following code:

            explicitEndPoint.BeforeTunnelConnectRequest += onBeforeTunnelConnectRequest;

        private async Task onBeforeTunnelConnectRequest(object sender, TunnelConnectSessionEventArgs e)
        {
            string hostname = e.HttpClient.Request.RequestUri.Host;

            if (hostname.Contains("dropbox.com"))
            {
                // Exclude Https addresses you don't want to proxy
                // Useful for clients that use certificate pinning
                // for example dropbox.com
                e.DecryptSsl = false;
            }
        }

Of course if you set this, you won't be able to see/modify the decrypted traffic, loaded urls.

honfika commented 4 years ago

I close this issue, feel free to reopen if needed.