CHERRY-PICK: TCP proxy for RF fixtures

This is a TCP proxy that designed for factory environment. Network
layout in factory are illustrated as following:
  [Remote Host] <---> [TCP Proxy] <---> DUT

In factory, unexpected exception might be happened at the portion involving
DUT. Those exceptions might cause remote host, where software stack are not
owned by Google into a strange state. To alleviate this behavior, we
introduce this proxy to keep the connection to remote as stable as
possible.

BUG=chrome-os-partner:18412
TEST=nc -l 8888
./tcp_proxy.py --remote_host localhost --remote_port 8888 --local_port 7777
telnet localhost 7777
Make sure the message forward in both direction

Original Change-Id: Ib06708b7c3701ce3f4742d3f78d17ab3ea55e8fe
Original Reviewed-on: https://gerrit.chromium.org/gerrit/51264
Original Commit-Queue: Chun-Ta Lin <itspeter@google.com>
Original Reviewed-by: Chun-Ta Lin <itspeter@google.com>
Original Tested-by: Chun-Ta Lin <itspeter@google.com>

Change-Id: I85388c387cf47a21200490d977e857f7f75f4543
Reviewed-on: https://gerrit.chromium.org/gerrit/56162
Commit-Queue: Chun-Ta Lin <itspeter@google.com>
Reviewed-by: Chun-Ta Lin <itspeter@google.com>
Tested-by: Chun-Ta Lin <itspeter@google.com>
1 file changed