Skip to content
Wehe server and desktop client
Python Other
  1. Python 99.4%
  2. Other 0.6%
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This software is licensed under the Apache License (see LICENSE.txt).

How to run a replay step by step:

Set up Wehe server:

  • Follow the steps in rootcahowto.txt to generate a self-signed certificate for secured communication.
  • Change the folders.txt to where the replay files are ( e.g., /replayTraces/Amazon_12122018/ by default)
  • Start the replay servers by ./

Using the Wehe app to test:

  • Assume the server address is Change the default setting in Settings to manually set the server address to before running a Wehe test.

Using the python Wehe client:

  • Assume the server address is Add another entry in class Instance in for 'test_server :' . You can then run a replay of the recorded traffic
python --pcap_folder=the/dir/to/pcap --serverInstance= test_server

How to create your own replay

Record the traffic by using tcpdump, e.g., running tcpdump while watching a video and save the pcap file as app1.pcap. We will use the parser script to process the pcap and create the replay files (in JSON format) that can be used by the client and server.

Assume the pcap is stored in the/dir/to/pcap.

On the client:

  • Create the pickle with original payload
sudo python --pcap_folder=the/dir/to/pcap
  • To randomize the payload in the original traffic (replace the original content with random strings)
sudo python --pcap_folder=the/dir/to/pcap --randomPayload=True --pureRandom=True
  • Do bit inversion in the original traffic (invert every bit in the content)
sudo python --pcap_folder=the/dir/to/pcap --randomPayload=True --bitInvert=True
  • Copy the replay directory (the/dir/to/pcap) to the server via scp


This API has been containerized. To run it within a container first go to the cloned directory and build with

sudo docker build . -t wehe

Then run with

sudo docker run -v <where/the/certs/are>:/wehe/ssl -v <where/to/save/the/output/on/host>:/data/RecordReplay --env SUDO_UID=$UID --net=host -itd wehe

Remove d from -itd to run outside of detached mode and see the output in STDOUT

You can’t perform that action at this time.