Browse Source

Add iperf.sh

pull/1186/head
Max Lv 7 years ago
parent
commit
95ef3d5635
1 changed files with 23 additions and 0 deletions
  1. 23
      scripts/iperf.sh

23
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"
Loading…
Cancel
Save