Created
November 4, 2017 06:32
-
-
Save holmesconan/652981029355798931a34360d42e8484 to your computer and use it in GitHub Desktop.
Bash script to choose shadowsocks servers.
This file contains 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 |
This file contains 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 | |
title="Select Shadowsocks server" | |
prompt="Pick an server:" | |
cmd=ss-local # shadowsocks-libev | |
port=1234 | |
localport=1080 | |
password="password" | |
verbose=-v | |
method="rc4" | |
options=( | |
"s1.shadowsocks.io" | |
"s2.shadowsocks.io" | |
"s3.shadowsocks.io" | |
"s4.shadowsocks.io") | |
echo "$title" | |
PS3="$prompt " | |
select opt in "${options[@]}" "Quit"; do | |
case "$REPLY" in | |
1 ) $cmd $verbose -s ${options[$REPLY]} -p $port -l $localport -k $password -m $method;; | |
2 ) $cmd $verbose -s ${options[$REPLY]} -p $port -l $localport -k $password -m $method;; | |
3 ) $cmd $verbose -s ${options[$REPLY]} -p $port -l $localport -k $password -m $method;; | |
4 ) $cmd $verbose -s ${options[$REPLY]} -p $port -l $localport -k custompassword -m $method;; | |
$(( ${#options[@]}+1 )) ) echo "Goodbye!"; break;; | |
*) echo "Invalid option. Try another one.";continue;; | |
esac | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment