Is there a command-line HTTP proxy that outputs to STDOUT so I can use it with Unix pipes?
I want to do something like this:
- Start the proxy at the command-line:
$ proxy -p 8888 | grep "Text I'm interested in" > ~/my_log.txt
- Configure my browser to use the HTTP proxy on port 8888.
- Browse the Internet. As I browse, HTML is grepped and saved to my_log.txt
- CTRL–C when I'm done.
UPDATE: I hadn't thought about this before, but the solution needs to handle gzipped/deflated content correctly.
Best Answer
Can you skip the proxy, and just use tcpdump with the -A option and a filter?