The VIProxy package implements a TCP proxy that translates between AF_INET and
AF_VSOCK connections. The proxy takes as input two addresses, one being
AF_INET and the other being AF_VSOCK. The proxy then starts a TCP listener on
the in-address and once it receives an incoming connection to the in-address, it
establishes a TCP connection to the out-addresses. Once both connections are
established, the proxy copies data back and forth.
The example directory contains a simple example of how one would use
viproxy.
Package viproxy implements a point-to-point TCP proxy that translates
between AF_INET and AF_VSOCK. This facilitates communication to and from an
AWS Nitro Enclave which constrains I/O to a VSOCK interface.
Start starts the TCP proxy along with all given connection forwarding
tuples. The function returns once all listeners are set up. The function
returns the first error that occurred (if any) while setting up the
listeners.