[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [flashproxy/master] Add flashproxy-exercise scripts.



commit 3fcb5457a1f105aadb2293e8a2789e80ddca6849
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date:   Thu Feb 9 15:27:55 2012 -0800

    Add flashproxy-exercise scripts.
    
    These are the hourly tests I have been running for a few months.
---
 experiments/exercise/exercise.sh            |   30 +++++++++++++++++++++++++++
 experiments/exercise/flashproxy-exercise.sh |    9 ++++++++
 2 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/experiments/exercise/exercise.sh b/experiments/exercise/exercise.sh
new file mode 100755
index 0000000..a7c7511
--- /dev/null
+++ b/experiments/exercise/exercise.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+FLASHPROXY_DIR="$HOME/flashproxy"
+TOR="$HOME/tor/src/or/tor"
+LOCAL_PORT=1080
+REMOTE_PORT=7070
+
+declare -a PIDS_TO_KILL
+stop() {
+	if [ -n "${PIDS_TO_KILL[*]}" ]; then
+		echo "Kill pids ${PIDS_TO_KILL[@]}."
+		kill "${PIDS_TO_KILL[@]}"
+	fi
+	exit
+}
+trap stop EXIT
+
+date
+
+"$FLASHPROXY_DIR"/connector.py -f tor-facilitator.bamsoftware.com ":$LOCAL_PORT" ":$REMOTE_PORT" &
+PIDS_TO_KILL+=($!)
+
+sleep 20
+
+"$TOR" UseBridges 1 Bridge 127.0.0.1:9001 Socks4Proxy 127.0.0.1:$LOCAL_PORT &
+PIDS_TO_KILL+=($!)
+
+sleep 60
+
+curl --retry 5 --socks4a 127.0.0.1:9050 http://check.torproject.org/
diff --git a/experiments/exercise/flashproxy-exercise.sh b/experiments/exercise/flashproxy-exercise.sh
new file mode 100755
index 0000000..ec60b8b
--- /dev/null
+++ b/experiments/exercise/flashproxy-exercise.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+DATE=$(date +"%Y-%m-%d-%H:%M")
+LOG="log-$DATE"
+
+# To get cron mail:
+# ./exercise.sh 2>&1 | tee "$LOG"
+# To not get cron mail:
+./exercise.sh &> "$LOG"



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits