VPP/HostStack/TestProxy
This is a test application that acts as a transport layer proxy. Note that is has only been tested with a TCP transport.
One simple way to test the application is to add a tap interface to vpp, start a python SimpleHTTPServer
that listens for connections incoming on the tap interface and, finally, a client that connects via a second vpp interface to the proxied content. The second interface can be a dpdk interface or another tap interface. In the example below, we use a dpdk interface.
Start vpp with a dpdk interface and add a tap interface:
# set int ip address <dpdk-interface> 6.0.1.1/24 # set int state <dpdk-interface> up # create tap host-ip4-addr 6.0.2.2/24 # set int ip addr tap0 6.0.2.1/24 # set int state tap0 up
Start the proxy app on the host:
# test proxy server server-uri tcp://0.0.0.0/80 client-uri tcp://6.0.2.2/80
From a different host with connectivity to the dpdk-interface
:
$ wget http://6.0.1.1/test-content
Note that this assumes that a file named "test-content" exists in the folder wherefrom the SimpleHTTPServer was started.