v2ray一键脚本开源啦(基于docker)
自己写的垃圾脚本,本地测试通过输出结果那里借鉴了秋水大佬的代码,在此表示感谢
采用的是v2ray官方的镜像
github在这里:https://github.com/isoftosyuri/share
[*]red='\033[0;31m'
[*]green='\033[0;32m'
[*]yellow='\033[0;33m'
[*]plain='\033[0m'
[*]
[*][[ $EUID -ne 0 ]] && echo -e "[${red}Error${plain}] This script must be run as root!" && exit 1
[*]
[*]base_port=`shuf -i 10000-50000 -n 1`
[*]function set_port_number()
[*]{
[*] #auto find suitable port
[*] lsof -Pi :$base_port -sTCP:LISTEN && \
[*] base_port=$(($base_port+1)) && \
[*] set_port_number
[*]}
[*]
[*]function env_check(){
[*]curl --help > /dev/null 2>&1 || (apt update -y && apt install -y curl || yum update -y && yum update -y curl)
[*]docker ps > /dev/null 2>&1 || (curl -sSL https://get.docker.io | sh > /dev/null 2>&1 && echo "Installing Docker...")
[*]docker ps > /dev/null 2>&1 || service docker start > /dev/null 2>&1
[*]mkdir -p /etc/v2ray
[*]str=`cat /proc/sys/kernel/random/uuid`
[*]cat > /etc/v2ray/config.json/dev/null 2>&1
[*]get_info
[*]}
[*]
[*]install_v2ray(){
[*] run
[*] clear
[*] echo
[*] echo -e "${yellow}Congratulations, v2ray${software}${yellow} server install completed!${plain}"
[*] echo -e "Your Server IP : ${green} ${ip} ${plain}"
[*] echo -e "Your Server Port : ${green} ${base_port} ${plain}"
[*] echo -e "Your Password : ${green} ${password} ${plain}"
[*] echo -e "Your Encryption Method: ${green} ${encryption_method} ${plain}"
[*] echo
[*]}
[*]
[*]install_v2ray复制代码 官方一行完事[*]bash 复制代码
tufu001 发表于 2019-2-26 18:12
官方一行完事
+1,为啥不直接用官方的?
022.gif
顶一下 日后有用来取 mark一下支持 收藏了 已经用小本本记下来了。 基于docker抠出来?您这是何苦来哉 感谢大佬分享 多谢大佬分享 战略性备用 本帖最后由 kerui 于 2019-2-26 21:07 编辑
我也来一个一键脚本,v2ray,ws+ssl的
https://my5353.com/9i4cs