gomitmproxyget-request

How to listen to GET and POST requests for all connections using GO


I am using python and mitmproxy to listen to all incoming and outgoing traffic so that I can capture the URLs. I run the script and it tells me all URLs my computer is trying to connect to.

I need to implement the same using Go but have not got a clue on how to start or what package to use. Can anyone guide me in the right direction please?

Thanks


Solution

  • You can either easily build a proxy with httputil - example here.
    Or you might want to use gopacket as described here.