Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I typically use tcpflow or Charles on Mac OS X. They are both useful tools that any back end engineer should know how to use. It helps diagnose any problem your app/code is facing and it's another good way to learn how existing apps interact with their back end web service. I often check how iOS app interact with the server by usually setting up a proxy on my laptop and configure on the iOS device settings to use my local proxy. Then simply fire away tcpflow or Charles and watch all the HTTP calls being made.


Plus 1 for for Charles. In the last month I've used it to determine:

- What an OAuth-signed SOAP envelope looks like, when Google (who prefer OAuth and require SOAP for some APIs) don't yet have it documented.

- That Chrome will encode links itself if necessary, but Firefox will not, causing a download on a colleagues app to not work on FF.

- That I'd accidentally seyup up my non-desktop app as a desktop app when registering for access to the Twitter API, resulting in an XML error response that Chrome wasn't showing me.

All over HTTPS. If you don't have an app like this (works on Windows, Mac and Linux) you need it.


Your first statement is a bit ambiguous, but I have to ask if you've gotten tcpflow to work on OSX. I can never get it to output anything when trying to monitor connections to localhost.


If you're looking to monitor traffic to localhost, bind the the `lo0` interface. For example, when I'm monitoring traffic to a local Rails app in development, I'll do something along the lines of:

    sudo tcpflow -c -n lo0 src or dst post 3000
and it'll pick up the traffic.

(Thanks for the tips on alternative ways of monitoring TCP traffic flows, folks!)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: