This is my first time using a Proxy to intercept tcp data and I think I misunderstood some concepts and this is why I'm unable to correctly intercept/log packets.
Here is my setup:

  1. My application:
    My application is an android app that I run on an Android Studio virtual device. It communicates with a distant server hosted at IP 42.2.2.2.2 on port 2222 (fake ip and port for privacy reasons)

  2. My proxy:
    I'm using this proxy: https://github.com/ickerwx/tcpproxy and sending all my traffic that goes to 42.2.2.2.2:2222 to 127.0.0.1:1111 using proxifier. I then launch my proxy using these settings:
    python tcpproxy.py -ti 42.2.2.2.2 -tp 2222-li 127.0.0.1 -lp 1111 -im log -om log -v

Now, here are the results I get in my cmd:

Connection from 127.0.0.1:53333
Connected to 42.2.2.2.2:2222
< < < < out: log
Logging to file out-20251111-024713.8208206
Connection from local client 127.0.0.1:53333 closed
Connection from 127.0.0.1:53588
Connected to 42.2.2.2.2:2222
< < < < out: log
Connection from local client 127.0.0.1:53588 closed
Connection from 127.0.0.1:56461
Connected to 42.2.2.2.2:2222
< < < < out: log
Connection from local client 127.0.0.1:56461 closed
Connection from 127.0.0.1:56532
Connected to 42.2.2.2.2:2222
< < < < out: log
Connection from local client 127.0.0.1:56532 closed
Connection from 127.0.0.1:56562
Connected to 42.2.2.2.2:2222
< < < < out: log
Connection from 127.0.0.1:56584
Connected to 42.2.2.2.2:2222
< < < < out: log
Connection from local client 127.0.0.1:56562 closed
Connection from local client 127.0.0.1:56584 closed
Connection from 127.0.0.1:56610
Connected to 42.2.2.2.2:2222
< < < < out: log
Connection from 127.0.0.1:56637
Connected to 42.2.2.2.2:2222
< < < < out: log
Connection from local client 127.0.0.1:56610 closed
Connection from local client 127.0.0.1:56637 closed
Connection from 127.0.0.1:56691
Connected to 42.2.2.2.2:2222
< < < < out: log

My application doesn't seem to be able to communicate with its distant server anymore, and I can still see the requests in Wireshark, making me think that the proxy is blocking the packets instead of passing them on to the server. Am I right to assume that ?

What did I misunderstood/set up wrong ?

I'm thanking you for reading up until now and I'm open to any pointer or feedback.

1 Reply 1

Off topic here. Try superuser. This site is for programming questions.

Your Reply

By clicking “Post Your Reply”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.