From b3b8225d65de3e8d834a14ec2fb8dfb058463c46 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Fri, 22 Feb 2019 17:45:48 +0100 Subject: [PATCH] WIP scripting --- Dockerfile | 3 +++ README.md | 4 ++++ scripts/xp1-client | 7 +++++-- scripts/xp1-server | 7 ++++++- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index fd5e258..0121436 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,4 +17,7 @@ USER 1000 ENV HOME /home/donar COPY --from=builder /home/donar-build/out/donar /usr/local/bin COPY --from=builder /home/donar-build/out/measlat /usr/local/bin +COPY --from=builder /home/donar-build/out/udpecho /usr/local/bin +COPY --from=builder /home/donar-build/scripts/xp1-client /usr/local/bin +COPY --from=builder /home/donar-build/scripts/xp1-server /usr/local/bin COPY ./torrc_simple /etc/torrc diff --git a/README.md b/README.md index 49ca7a9..253abf5 100644 --- a/README.md +++ b/README.md @@ -19,3 +19,7 @@ Uncheck all the checkboxes. sudo docker build -t registry.gitlab.inria.fr/qdufour/donar . sudo docker push registry.gitlab.inria.fr/qdufour/donar ``` + +``` +sudo docker run -t -i -v `pwd`/xp1:/home/donar/res registry.gitlab.inria.fr/qdufour/donar xp1-server +``` diff --git a/scripts/xp1-client b/scripts/xp1-client index 0c4d2c9..a7afac9 100755 --- a/scripts/xp1-client +++ b/scripts/xp1-client @@ -1,4 +1,7 @@ #!/bin/bash tor -f /etc/torrc & -donar -a naive -c /shared/onion_services.pub -r 9000 & -measlat 127.13.3.7 9000 100 100 50 +sleep 2 +mkdir -p ./shared +donar -a naive -c ./shared/onion_services.pub -r 9000 & +measlat -h 127.13.3.7 -p 9000 # Used to wait for connections +measlat -h 127.13.3.7 -p 9000 -c $1 -i $2 -s $3 > `mktemp -p ./res res-XXXXXXXXXXXXXXXX.txt` diff --git a/scripts/xp1-server b/scripts/xp1-server index 05a7907..30b3b26 100755 --- a/scripts/xp1-server +++ b/scripts/xp1-server @@ -1,2 +1,7 @@ #!/bin/bash - +tor -f /etc/torrc & +sleep 2 +mkdir -p ./shared +cd ./shared +donar -a naive -s -e 9000 & +udpecho -p 9000