←back to thread

664 points alexflint | 3 comments | | HN request time: 0.842s | source
Show context
alexflint ◴[] No.42919910[source]
httptap is a process-scoped http tracer that you can run without root priveleges. You can run `httptap <command>` where <command> is a linux program and you get a trace of http/https requests and responses in standard output:

    httptap -- python -c "import requests; requests.get('https://monasticacademy.org')"
    ---> GET https://monasticacademy.org/
    <--- 308 https://monasticacademy.org/ (15 bytes)
    ---> GET https://www.monasticacademy.org/
    <--- 200 https://www.monasticacademy.org/ (5796 bytes)
It works by running <command> in an isolated network namespace. It has its own TCP/IP stack (for which it uses gVisor). It is not an HTTP proxy and so does not rely on <command> being configured to use an HTTP proxy. It decrypts TLS traffic by generating a CA on the fly. It won't install any iptables rules or make other global system changes.
replies(3): >>42920666 #>>42921671 #>>42922996 #
gear54rus ◴[] No.42920666[source]
can it modify requests or responses? with the current web getting increasingly user-hostile a need for tool like this was never more apparent

especially if it doesn't require proxy configuration

replies(4): >>42921354 #>>42921863 #>>42922082 #>>42930927 #
1. pcpuser ◴[] No.42921863[source]
You might find mitmproxy useful.
replies(1): >>42923115 #
2. alexflint ◴[] No.42923115[source]
Yep, mitmproxy is fantastic IMO.
replies(1): >>42924295 #
3. gear54rus ◴[] No.42924295[source]
Apparently there's JS interface for it too: https://www.npmjs.com/package/mitmproxy

But the problem with it is that you have to configure proxy in the app (they do got transparent and wireguard modes but there's still quite a bit of configuration).