-
-
Save Liaozhebin/f34de4d57522dab6fbcf4b403099432e to your computer and use it in GitHub Desktop.
Bandwidth test for shadowsocks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
method=$1 | |
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 3 | |
iperf -c 127.0.0.1 -p 8387 | |
kill $ss_tunnel_pid | |
kill $ss_server_pid | |
kill $iperf_pid | |
echo "Test Finished" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment