2

I'm developing a backend server and here is how the architecture of the backend looks like:

APP --> Server1 --> Server2 --> Server3 --> MyServer

APP sends a HTTP request to the Server1, and all of the servers at backend communicate each other with the method RPC, which is based on the TCP protocol.

I'm developing the MyServer and since my job hasn't finished yet, I need to do many tests, but the Server3 is not always available.

I don't know what Server1, Server2 and Server3 did and the RPC from Server3 to MyServer is really complicated, it contains many parameters that I don't know. What I need is to capture a request from Server3, copy it's content to a script so that I can run the script to simulate a request.

Let me make an example:

Server3 will send a RCP to MyServer with the parameters p1, p2, p3. For me, I only care about p3, so I process the p3, generate a new parameter p4, and send p1, p2 and p4 to another server. So I need to simulate a RPC from Server3 so that I can send whenever I need to test the MyServer.

About protocol

Our team used a private framework, it has its own protocol to make a RPC. All I know is that the protocol is based on TCP, instead of HTTP. So what I need is to capture a request from Server3 and replay it whenever I need.

Yves
  • 3,291

1 Answers1

1

If you are dealing with HTTP, a much better tool instead of tcpdump is a "transparent proxy". This can then also re-run requests.

There are quite a few transparent proxies around, google.

One example is mitmproxy, and here is how to replay requests.

dirkt
  • 32,309