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

     1  #!/bin/bash
     2  #first arg is the port number for this
     3  #second arg is the prebuilt circuit for testing (could be empty)
     4  #third arg is the number of hops in this circuit
     5  #fourth arg is the dest addr
     6  
     7  ./initmixnet.sh
     8  source ./define.sh
     9  
    10  # These should be run as root.
    11  $GOPATH/bin/tao host init -tao_domain $DOMAIN -hosting process -root -pass $PASSWORD
    12  sudo -E $GOPATH/bin/tao host start -tao_domain $DOMAIN -host linux_tao_host -pass $PASSWORD &
    13  sleep 2
    14  
    15  directory_file=/tmp/directories
    16  
    17  echo "Starting proxy..."
    18  $GOPATH/bin/tao run -tao_domain $DOMAIN $DOMAINROOT/mixnet_proxy -dirs $directory_file --config $DOMAIN/tao.config --addr :$1 --circuit $2 --hops $3 &
    19  sleep 0.5
    20  
    21  $DOMAINROOT/mixnet_simpleclient --proxy_addr 127.0.0.1:$1 --dest_addr $4