Setting up invisible proxy


#1

Hello everyone,

I’m trying to debug, inspect and modify a WebSocket connection that a Windows application is performing.
I already tried to redirect all traffic to my Linux box, but it seems that the system-wide proxy settings are ignored (I’m 100% sure about the connection and the remote host since I read them from the source code).
As far as I know, the only option I have left is to create some kind of “invisible proxy” (see Burp documentation). So I created an entry in the hosts file that points the remote host to my proxy box, and set MITMproxy to listen to the same port.
Sadly, I’m facing the error Invalid HTTP request form (expected: authority or absolute, got: relative) . As far as I can understand, the problem is that the application under test is using relative paths, while MITM requires the full host.
Reading the manual, I think I could create an addon that would translate all relative requests into absolute ones, but I’m not sure if that would work and if there’s an easier (more correct?) way to do that.

Any suggestions?


#2

Hi @tampe125,

Take a look at https://docs.mitmproxy.org/stable/concepts-modes/ - that should get you further. :slight_smile: