|
|
@ -10,7 +10,7 @@ none='\e[0m' |
|
|
|
# Root |
|
|
|
# Root |
|
|
|
[[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1 |
|
|
|
[[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1 |
|
|
|
|
|
|
|
|
|
|
|
_version="v3.42" |
|
|
|
_version="v3.43" |
|
|
|
|
|
|
|
|
|
|
|
cmd="apt-get" |
|
|
|
cmd="apt-get" |
|
|
|
|
|
|
|
|
|
|
@ -111,10 +111,6 @@ fi |
|
|
|
|
|
|
|
|
|
|
|
_load transport.sh |
|
|
|
_load transport.sh |
|
|
|
ciphers=( |
|
|
|
ciphers=( |
|
|
|
aes-128-cfb |
|
|
|
|
|
|
|
aes-256-cfb |
|
|
|
|
|
|
|
chacha20 |
|
|
|
|
|
|
|
chacha20-ietf |
|
|
|
|
|
|
|
aes-128-gcm |
|
|
|
aes-128-gcm |
|
|
|
aes-256-gcm |
|
|
|
aes-256-gcm |
|
|
|
chacha20-ietf-poly1305 |
|
|
|
chacha20-ietf-poly1305 |
|
|
@ -409,17 +405,17 @@ shadowsocks_password_config() { |
|
|
|
shadowsocks_ciphers_config() { |
|
|
|
shadowsocks_ciphers_config() { |
|
|
|
|
|
|
|
|
|
|
|
while :; do |
|
|
|
while :; do |
|
|
|
echo -e "请选择 "$yellow"Shadowsocks"$none" 加密协议 [${magenta}1-7$none]" |
|
|
|
echo -e "请选择 "$yellow"Shadowsocks"$none" 加密协议 [${magenta}1-3$none]" |
|
|
|
for ((i = 1; i <= ${#ciphers[*]}; i++)); do |
|
|
|
for ((i = 1; i <= ${#ciphers[*]}; i++)); do |
|
|
|
ciphers_show="${ciphers[$i - 1]}" |
|
|
|
ciphers_show="${ciphers[$i - 1]}" |
|
|
|
echo |
|
|
|
echo |
|
|
|
echo -e "$yellow $i. $none${ciphers_show}" |
|
|
|
echo -e "$yellow $i. $none${ciphers_show}" |
|
|
|
done |
|
|
|
done |
|
|
|
echo |
|
|
|
echo |
|
|
|
read -p "$(echo -e "(默认加密协议: ${cyan}${ciphers[6]}$none)"):" ssciphers_opt |
|
|
|
read -p "$(echo -e "(默认加密协议: ${cyan}${ciphers[1]}$none)"):" ssciphers_opt |
|
|
|
[ -z "$ssciphers_opt" ] && ssciphers_opt=7 |
|
|
|
[ -z "$ssciphers_opt" ] && ssciphers_opt=2 |
|
|
|
case $ssciphers_opt in |
|
|
|
case $ssciphers_opt in |
|
|
|
[1-7]) |
|
|
|
[1-3]) |
|
|
|
new_ssciphers=${ciphers[$ssciphers_opt - 1]} |
|
|
|
new_ssciphers=${ciphers[$ssciphers_opt - 1]} |
|
|
|
echo |
|
|
|
echo |
|
|
|
echo |
|
|
|
echo |
|
|
@ -554,7 +550,7 @@ change_shadowsocks_ciphers() { |
|
|
|
read -p "$(echo -e "(当前加密协议: ${cyan}${ssciphers}$none)"):" ssciphers_opt |
|
|
|
read -p "$(echo -e "(当前加密协议: ${cyan}${ssciphers}$none)"):" ssciphers_opt |
|
|
|
[ -z "$ssciphers_opt" ] && error && continue |
|
|
|
[ -z "$ssciphers_opt" ] && error && continue |
|
|
|
case $ssciphers_opt in |
|
|
|
case $ssciphers_opt in |
|
|
|
[1-7]) |
|
|
|
[1-3]) |
|
|
|
new_ssciphers=${ciphers[$ssciphers_opt - 1]} |
|
|
|
new_ssciphers=${ciphers[$ssciphers_opt - 1]} |
|
|
|
if [[ $new_ssciphers == $ssciphers ]]; then |
|
|
|
if [[ $new_ssciphers == $ssciphers ]]; then |
|
|
|
echo |
|
|
|
echo |
|
|
|