bProxy is a research proxy that I wrote specifically with the BYOND software in mind, but can be easily adapted to meet a more general need by altering the packet information.
The design is rather straightforward. It listens for connections on a given port (Customizable with the -l parameter). When a connection is received, it opens up a separate socket for the outbound traffic to the specified (Customizable with the -h and -c parameters for host and port respectively) socket. After that, it simply polls for data and transmits anything received from one end to the other through the packet marshal. The packet marshal can opt to log all data going through it during the routing process, making it ideal for research purposes.