From 95ef3d5635c748e9b79fe1d2b35e782d6b02249a Mon Sep 17 00:00:00 2001 From: Max Lv Date: Fri, 3 Feb 2017 18:47:24 +0800 Subject: [PATCH] Add iperf.sh --- scripts/iperf.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 scripts/iperf.sh diff --git a/scripts/iperf.sh b/scripts/iperf.sh new file mode 100755 index 00000000..0fd79d1e --- /dev/null +++ b/scripts/iperf.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +number=$1 +method=$2 + +ss-tunnel -k test -m $method -l 8387 -L 127.0.0.1:8388 -s 127.0.0.1 -p 8389 & +ss_tunnel_pid=$! +ss-server -k test -m $method -s 127.0.0.1 -p 8389 & +ss_server_pid=$! + +iperf -s -p 8388 & +iperf_pid=$! + +sleep 1 + +iperf -c 127.0.0.1 -p 8387 -n $number + +kill $ss_tunnel_pid +kill $ss_server_pid +kill $iperf_pid + +sleep 1 +echo "Test Finished"