
sudo tcpdump -i lo -w mbox_to_server.pcap port 4433 &
sudo tcpdump -i lo -w client_to_mbox.pcap port 8423 &

echo "Starting Middlebox"
../middlebox 8423 127.0.0.1:8423 simpleMiddlebox &
mboxpid=$(pidof middlebox)

#sleep .3

echo "Starting Server"
../server ./simpleEchoScript.sh &
serverpid=$(pidof server)

#sleep .3

echo "Starting Client"
../client simple_input.json

echo "Cleaning up"
kill $mboxpid
kill $serverpid
killall tcpdump

