I have a daemon, call it
whatverd, running on TCP port 11111. It is basically an http server, but it does not do any kind of logging or debugging. It only returns query results via JSON in the http(s) response, like a normal web server. How can I capture and write http(s) requests and responses to a local file? My options seem to be:
- Modify the source code, in a language I don't know at all.
- Run an http proxy of some sort.
tcpdumpand redirect the output to a file.
Is there an obvious 'right' way to do this? Thanks.
PS: It's running on Debian Jessie (8), I do have root, and I can modify the TCP port number that
whateverd listens on.