0

I'm trying to intercept HTTP/HTTPS traffic from a Windows application using Titanium Web Proxy in my C# app.

My C# app sets up an explicit proxy on port 8888 and captures most HTTPS requests just fine (e.g., from login.live.com, events.data.microsoft.com, etc.). However, traffic to what i need is never seen in my proxy.

What's confusing is: If I use Fiddler Classic, I can see the traffic to the api. So I know the traffic exists and isn't encrypted in a way that makes interception impossible.

            proxyServer = new ProxyServer();

            proxyServer.CertificateManager.CreateRootCertificate();
            proxyServer.CertificateManager.TrustRootCertificateAsAdmin();
            proxyServer.CertificateManager.EnsureRootCertificate();
            proxyServer.EnableConnectionPool = true;


            var explicitEndPoint = new ExplicitProxyEndPoint(System.Net.IPAddress.Any, 8888, true);

            proxyServer.AddEndPoint(explicitEndPoint);
            proxyServer.Start();

            proxyServer.SetAsSystemHttpProxy(explicitEndPoint);
            proxyServer.SetAsSystemHttpsProxy(explicitEndPoint);

            proxyServer.BeforeRequest += OnRequest;
            proxyServer.BeforeResponse += OnResponse;
    ```


    private static async Task OnRequest(object sender, SessionEventArgs e)
    {
        Console.WriteLine($"[Request] {e.HttpClient.Request.Url}");
        await Task.CompletedTask;
    }


    private static async Task OnResponse(object sender, SessionEventArgs e)
    {
        Console.WriteLine($"[Response] {e.HttpClient.Request.Url}");
        await Task.CompletedTask;
    }

2
  • I'm just guessing, but I suspect fildder is working because the connection is http 1.1 (chunk mode) which requires a next chunk message to be sent. In c# the next chunk message is not being sent. Try forcing connection using http 1.0 (stream mode). Commented Jul 27 at 16:30
  • Titanium Web Proxy seems to have HTTP2 support, Fiddler classic not. My guess is that the HTTP2 support in Titanium is not complete and this affects your app. As Fiddler classic is limited to HTTTP1.x the app can't use HTTP2 and thus the connection works and you can see everything not just the data to servers that use HTTP1.1 by default. Commented Aug 15 at 19:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.