tproxy
tproxy copied to clipboard
Is there a loop in the command?
trafficstars
I'm new to Docker and I'm confused when I try to understand the command
docker run --rm -it -p <listen-port>:<listen-port> -p <remote-port>:<remote-port> kevinwan/tproxy:v1 tproxy -l 0.0.0.0 -p <listen-port> -r host.docker.internal:<remote-port>
I'm gonna split the command into 2 parts:
docker run --rm -it -p <listen-port>:<listen-port> -p <remote-port>:<remote-port> kevinwan/tproxy:v1: The flag-pmap 2 ports of the host to the container, that't alright;tproxy -l 0.0.0.0 -p <listen-port> -r host.docker.internal:<remote-port>: The-r host.docker.internal:<remote-port>part cause the container access the host port directly, which I think may cause a loop like this:

Could you please help me to figure it out?
Yes, I think so. It's actually the same port that the traffic goes to.