Skip to content

Commit

Permalink
Optimization code
Browse files Browse the repository at this point in the history
  • Loading branch information
loyess committed Jul 29, 2020
1 parent f3c4906 commit 183ef28
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 20 deletions.
6 changes: 3 additions & 3 deletions prepare/v2ray_plugin_prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,15 @@ is_disable_mux(){
while true
do
echo
echo -e "是否禁用多路复用(mux)"
echo -e "是否启用多路复用(mux)"
read -p "(默认: n) [y/n]: " yn
[ -z "${yn}" ] && yn="N"
case "${yn:0:1}" in
y|Y)
isDisable=disable
isDisable=enable
;;
n|N)
isDisable=enable
isDisable=disable
;;
*)
echo
Expand Down
18 changes: 12 additions & 6 deletions ss-plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,6 @@ install_completed(){
${GO_SHADOWSOCKS2_INIT} start > /dev/null 2>&1
fi

clear -x
# SS + V2ray-plugin
if [[ ${plugin_num} == "1" ]]; then
improt_package "templates/visible" "v2ray_plugin_visible.sh"
Expand Down Expand Up @@ -903,8 +902,7 @@ install_step_all(){
config_ss
gen_ss_links
install_completed
improt_package "utils" "view_config.sh"
show_config "all"
do_show
}

install_cleanup(){
Expand Down Expand Up @@ -974,8 +972,16 @@ do_scan(){
}

do_show(){
improt_package "utils" "view_config.sh"
show_config "standalone"
local mark=$1

if [ -e $HUMAN_CONFIG ]; then
if [[ ${mark} == "cleanScreen" ]]; then
clear -x
fi
cat $HUMAN_CONFIG
else
echo "The visible config not found."
fi
}

do_log(){
Expand Down Expand Up @@ -1150,7 +1156,7 @@ case ${action} in
do_${action} "${2}"
;;
show)
do_${action}
do_${action} "cleanScreen"
;;
log)
do_${action}
Expand Down
11 changes: 0 additions & 11 deletions utils/view_config.sh

This file was deleted.

0 comments on commit 183ef28

Please sign in to comment.