You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
366 B
23 lines
366 B
#!/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"
|