Hacker News new | ask | show | jobs
by stevebot 4146 days ago
Ah and I had just finally coughed up 50 dollars for my Charles license. Charles is a nice tool, but this seems so much nicer as I don't see anywhere that the user is required to setup a proxy manually on the phone.

This does make me wonder how their HTTP debugging works? I am assuming that data is passed over USB. Are they using ADB underneath this all?

2 comments

It uses the same mechanism that Chrome dev tools remote debugging uses which is a local websocket server accessed over adb. [1][2]

[1]https://github.com/facebook/stetho/blob/master/stetho/src/ma...

[2]https://developer.chrome.com/devtools/docs/remote-debugging

It requires you to compile a proxy into the application:

    OkHttpClient client = new OkHttpClient();
    client.networkInterceptors().add(new StethoInterceptor());
How is that really a proxy if it gets compiled into your application? From what others have said it sounds like the real mechanism is over adb.
Its not a proxy, it requires that you build hooks into your http engine (OkHttp/HttpUrlConnection) to forward events to the NetworkEventReporter interface.