How do you debug your HTTPS connections? If I run...
# ktor
s
How do you debug your HTTPS connections? If I run Wireshark I only see TLS packages (obviously). Now I found a debug tool that acts as a proxy with https://mitmproxy.org/ But Ktor does not support HTTPS proxies: https://ktor.io/docs/client-proxy.html
1
t
For https debugging in general we use a combination of 1. on device logging in debug clients (e.g. something with a ui like chucker on Android), which is great if you create applications for third parties as they can share this info 2. on the dev machines a local proxy with https://github.com/mockoon/mockoon which aside of the proxy giving insight on the requests also supports mocking (i guess this might help with what you are asking for 🤞) 3. backend logs (mostly plain, sometimes via kibana) Hope this is helpful in some way 😅
s
Will Mockoon work with Ktor?
Thanks for the hint to Mockoon, but I don't see how I can use that, if Ktor doesn't allow setting a HTTPS proxy.
t
ah i forgot a detail -> in most clients we have the ability to define a custom backend url, which we can wire directly to that machine
s
Ah, so I set the proxy address as URL and the proxy calls the real address. Ok, not that convenient, but sounds like a solution while Ktor does not support HTTPS proxies.
👍 1
Thanks
t
It also requires you to have full control of the client side which might not be available in all cases, but if that is a possibility it is great to get rid of any technological dependency in both directions
💯 1
j
@Stefan Oltmann From what I read, HTTPS proxies aren’t supported only in the Darwin engine 🤔
Also, if you’re searching for a proxy to analyse requests, I recommend Proxyman: https://proxyman.io/
e
on Linux mitmproxy supports transparent mode so the client doesn't need to know about the proxy at all. I'm pretty sure there are intercepting proxies for Mac that can do that too
j
I would suggest https://httptoolkit.com/ it does even work for flutter apps
💡 1
🙏 1
💯 1
s
@Jimmy Nelle Thank you! The HTTP toolkit is really great and does exactly what I was looking for. It allows directly connecting into an JVM app and look into its HTTPS traffic. UI is also beautiful. Great tool!
👍 1