You're replying to a comment by Konstantin.

December 29, 2012, 15:07

You say:

> That's correct, because we did not set up a bidirectional pipe. If you add another pipe, you can get the data back on another port:
> $ nc -l -p 12345 | nc www.google.com 80 | nc -l -p 12346

But that's not the whole truth. Actually, you *can* do bidirectional proxy with a little trick involving named pipes:

$ mkfifo ~/loop.pipe && cat ~/loop.pipe | nc -l -p 12345 | nc www.google.com 80 > ~/loop.pipe

This way everything you send to port 12345 is redirected to www.google.com:80, and everything sent back from www.google.com:80 will be redirected back to local port 12345.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "network_132": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.