github.com/jlmucb/cloudproxy@v0.0.0-20170830161738-b5aa0b619bc4/go/apps/mixnet/scripts/README.md (about)

     1  Mixnet testing scripts
     2  ======================
     3  
     4  This directory contains some testing scripts for mixnet project.
     5  
     6  Local tests
     7  -----------
     8  
     9  To run the test on local machine, run
    10  
    11      ./initmixnet.sh
    12      ./run.sh
    13  
    14  Currently, it ues 16 clients (proxies) with 6 directories and 1 directory. The
    15  16 clients connect to an echo server using TLS, and there are 4 fixed circuits
    16  that the 16 clients use. After a successful run, you will see "My name is <num>"
    17  for num = 0, ... ,16 in a random order.
    18  
    19  
    20  Network tests
    21  -------------
    22  
    23  We also provide scripts to run a test across machines. This assumes, again, that
    24  CloudProxy is installed on all the machines. We then have to manually start the
    25  different components:
    26  
    27  * Directory: the directory for mix-net
    28  * Router(s): the routers for mix-net. We need at least 1, but could have more.
    29  
    30  For testing, it also needs two more instances:
    31  
    32  * Client(s): the clients that will be used for testing
    33  * Server: the echo server that will echo msgs back to the client
    34  
    35  For the simplest test, we will run a one client and one router, which means hop
    36  counter of 1 and batch size 1.
    37  
    38  To run the test, first open up different terminals for the different instances,
    39  then follow the steps.
    40  
    41  1. On terminal 1: Start the directory by running
    42     `go/apps/mixnet/run_directory.sh`. The password for soft_tao is all `mixnet`.
    43  
    44  2. On terminal 2 and 3: First write the address of the directory to
    45     `/tmp/directories`. E.g., run
    46  
    47      `echo 10.138.0.2:8000 > /tmp/directories`
    48  
    49  3. On terminal 2: Start the router by running
    50  
    51      `go/apps/mixnet/run_router.sh 10.138.0.3 1`
    52  
    53     where the first argument is the ip address and the second is the batch size
    54     (1 for this simple test).
    55  
    56  4. On terminal 3: Start the echo server by running
    57  
    58      `./run_echoserver.sh`
    59  
    60  5. On terminal 4: Start the client by running
    61  
    62      `./run_client.sh 9000 1 10.138.0.4:10000`
    63  
    64     where the first argument is the port number of the proxy, the second argument
    65     is number of hops (in this case, just 1), and the third argument is the
    66     destination address.
    67  
    68  If the run is successful, you should see `Got: My name is 0.` on the client,
    69  which was echoed back by the echo server.