Skip to content

Commit

Permalink
微调菜单显示信息和智能安装wget和curl
Browse files Browse the repository at this point in the history
  • Loading branch information
hongwenjun committed Mar 22, 2019
1 parent 6467339 commit 1dc8390
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 7 deletions.
4 changes: 2 additions & 2 deletions shadowsocks/install_ss-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# 定义文字颜色
Green="\033[32m" && Red="\033[31m" && GreenBG="\033[42;37m" && RedBG="\033[41;37m" && Font="\033[0m"

echo -e "${Green}:: 注意 快速安装 shadowsocks-libev 脚本 For Debian Centos Ubuntu ${Font}"
echo -e "${RedBG}:: 如果没有正确安装,请编译安装/更新 ${RedBG} shadowsocks-libev ${Font}"
echo -e "${Green}:: 快速安装 shadowsocks-libev 脚本 For Debian_9 Centos_7 Ubuntu_18 ${Font}"
echo -e "${Red}:: 如果运行运行库不匹配,请编译安装/更新 ${RedBG} shadowsocks-libev ${Font}"
echo -e "${Green}$ bash <(curl -L -s git.io/fhExJ) update ${Font}"

def_install(){
Expand Down
31 changes: 26 additions & 5 deletions vps.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# 默认安装 WireGuard Shadowsocks V2Ray 服务端三合一脚本
# 默认安装 WireGuard Shadowsocks V2Ray 服务端三合一脚本 短网址 https://git.io/vps.sh
default_install(){

# 一键安装wireguard 脚本
Expand Down Expand Up @@ -29,18 +29,37 @@ display_conf(){
cat /etc/wireguard/client.conf
}

base_tools(){
# 简化判断系统 debian/centos 族群
if [ -e '/etc/redhat-release' ]; then
yum update -y && yum install -y wget curl vim ca-certificates
else
apt update && apt install -y wget curl vim ca-certificates
fi
}

wget_curl(){
if [[ ! -e /usr/bin/wget ]]; then
base_tools
fi
if [[ ! -e /usr/bin/curl ]]; then
base_tools
fi
}

# 设置菜单
start_menu(){
clear
echo_GreenBG "> 开源项目: https://github.com/hongwenjun/vps_setup "
echo_SkyBlue "> 1. 默认安装 WireGuard Shadowsocks V2Ray 服务端三合一"
echo_SkyBlue "> 2. 选择安装 WireGuard 多用户服务端"
echo_SkyBlue "> 3. 选择安装 Shadowsocks 编译/更新"
echo_SkyBlue "> 4. 卸载 WireGuard Shadowsocks V2ray 服务"
echo_Yellow "> 5. 显示 WireGuard V2ray 和 rc.local 配置"
echo_SkyBlue "> 3. 编译安装/更新 ${RedBG} shadowsocks-libev ${Font}"
echo_SkyBlue "> 4. 卸载 WireGuard Shadowsocks V2ray 服务程序"
echo "-------------------------------------------------------"
echo_Yellow "> 5. 显示 WireGuard V2ray 和 rc.local 配置信息"
echo_Yellow "> 6. 退出"
echo_Yellow "> 7. WireGuard 管理命令 ${RedBG} bash wgmtu "
echo_Yellow "> 8. 选择安装${GreenBG} Shadowsocks 和 V2Ray 配置显示二维码"
echo_Yellow "> 8. 选择安装 ${GreenBG} Shadowsocks 和 V2Ray ${Yellow} 配置显示二维码"
read -p "请输入数字:" num
case "$num" in
1)
Expand Down Expand Up @@ -89,5 +108,7 @@ echo_GreenBG(){
echo -e "${GreenBG}$1${Font}"
}

# 安装 wg ss v2 脚本开始菜单和必要的wget和curl工具
wget_curl
start_menu

0 comments on commit 1dc8390

Please sign in to comment.