You're viewing a comment by Konstantin and its responses.

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 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 80 > ~/loop.pipe

This way everything you send to port 12345 is redirected to, and everything sent back from 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 "floppy_132": (just to make sure you're a human)

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