mirror of https://github.com/mack-a/v2ray-agent
Merge branch 'master' of another.github.com:mack-a/v2ray-agent into dev
commit
f3ad6034c9
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
name: 提交建议
|
||||
about: 对这个项目提出一个建议
|
||||
title: ''
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**详细描述建议的内容**
|
|
@ -0,0 +1,55 @@
|
|||
---
|
||||
name: bug反馈
|
||||
about: bug反馈
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
>下方留下相关的描述即可
|
||||
|
||||
**1.描述出现的问题**
|
||||
```
|
||||
#
|
||||
```
|
||||
|
||||
**2.是否直接安装失败**
|
||||
- 是
|
||||
- 否
|
||||
|
||||
**3.直接安装失败的错误内容或者截图**
|
||||
- 此项没有可忽略
|
||||
|
||||
**4.系统版本【例:Centos8】**
|
||||
>下列系统版本需自己补全
|
||||
- Centos8
|
||||
|
||||
**5.脚本版本**
|
||||
-
|
||||
|
||||
**6.安装类型**
|
||||
- 安装
|
||||
- 个性化安装
|
||||
|
||||
**7.安装的核心版本**
|
||||
>version位置需自己替换
|
||||
- Xray-core【version】
|
||||
- v2ray-core【version】
|
||||
- v2ray-core[XTLS]
|
||||
|
||||
**8.出现问题的协议类型**
|
||||
- VLESS+XTLS
|
||||
- VLESS+TLS+WS
|
||||
- VMess+TLS+WS
|
||||
- VMess+TLS+TCP
|
||||
- Trojan
|
||||
- Trojan-go+ws
|
||||
|
||||
**9.尝试重装后是否100%复现**
|
||||
- 是
|
||||
- 否
|
||||
|
||||
**10.是否仔细检查客户端与服务端的配置是否相同**
|
||||
- 是
|
||||
- 否
|
42
install.sh
42
install.sh
|
@ -19,9 +19,9 @@ checkSystem(){
|
|||
elif [[ ! -z `cat /etc/issue | grep -i "ubuntu" | grep -v grep` ]] || [[ ! -z `cat /proc/version | grep -i "ubuntu" | grep -v grep` ]]
|
||||
then
|
||||
release="ubuntu"
|
||||
installType='apt -y install'
|
||||
upgrade="apt update -y"
|
||||
removeType='apt --purge remove'
|
||||
installType='apt-get -y install'
|
||||
upgrade="apt-get update -y"
|
||||
removeType='apt-get --purge remove'
|
||||
fi
|
||||
if [[ -z ${release} ]]
|
||||
then
|
||||
|
@ -346,31 +346,31 @@ installTools(){
|
|||
if [[ -z `find /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin |grep -v grep|grep -w wget` ]]
|
||||
then
|
||||
echoContent green " ---> 安装wget"
|
||||
${installType} wget > /dev/null
|
||||
${installType} wget > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [[ -z `find /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin |grep -v grep|grep -w curl` ]]
|
||||
then
|
||||
echoContent green " ---> 安装curl"
|
||||
${installType} curl > /dev/null
|
||||
${installType} curl > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [[ -z `find /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin |grep -v grep|grep -w unzip` ]]
|
||||
then
|
||||
echoContent green " ---> 安装unzip"
|
||||
${installType} unzip > /dev/null
|
||||
${installType} unzip > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [[ -z `find /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin |grep -v grep|grep -w socat` ]]
|
||||
then
|
||||
echoContent green " ---> 安装socat"
|
||||
${installType} socat > /dev/null
|
||||
${installType} socat > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [[ -z `find /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin |grep -v grep|grep -w tar` ]]
|
||||
then
|
||||
echoContent green " ---> 安装tar"
|
||||
${installType} tar > /dev/null
|
||||
${installType} tar > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [[ -z `find /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin |grep -v grep|grep cron` ]]
|
||||
|
@ -378,15 +378,15 @@ installTools(){
|
|||
echoContent green " ---> 安装crontabs"
|
||||
if [[ "${release}" = "ubuntu" ]] || [[ "${release}" = "debian" ]]
|
||||
then
|
||||
${installType} cron > /dev/null
|
||||
${installType} cron > /dev/null 2>&1
|
||||
else
|
||||
${installType} crontabs > /dev/null
|
||||
${installType} crontabs > /dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
if [[ -z `find /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin |grep -v grep|grep -w jq` ]]
|
||||
then
|
||||
echoContent green " ---> 安装jq"
|
||||
${installType} jq > /dev/null
|
||||
${installType} jq > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [[ -z `find /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin |grep -v grep|grep binutils` ]]
|
||||
|
@ -394,16 +394,23 @@ installTools(){
|
|||
echoContent green " ---> 安装binutils"
|
||||
${installType} binutils > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [[ -z `find /bin /usr/sbin /usr/local/bin /usr/local/sbin |grep -v grep|grep ping6` ]]
|
||||
then
|
||||
echoContent green " ---> 安装ping6"
|
||||
${installType} inetutils-ping > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [[ -z `find /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin |grep -v grep|grep -w nginx` ]]
|
||||
then
|
||||
echoContent green " ---> 安装nginx"
|
||||
${installType} nginx > /dev/null
|
||||
${installType} nginx > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [[ -z `find /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin |grep -v grep|grep -w sudo` ]]
|
||||
then
|
||||
echoContent green " ---> 安装sudo"
|
||||
${installType} sudo > /dev/null
|
||||
${installType} sudo > /dev/null 2>&1
|
||||
fi
|
||||
# todo 关闭防火墙
|
||||
|
||||
|
@ -510,7 +517,7 @@ EOF
|
|||
|
||||
# 检查ip
|
||||
checkIP(){
|
||||
pingIP=`ping -4 -c 1 -W 1000 ${domain}|sed '1{s/[^(]*(//;s/).*//;q;}'`
|
||||
pingIP=`ping -c 1 -W 1000 ${domain}|sed '1{s/[^(]*(//;s/).*//;q;}'`
|
||||
# ping -6 -c 1 -W 1000 ${domain}|sed '1{s/^([\da-fA-F]{1,4}:){7}[\da-fA-F]{1,4}$//;q;}'
|
||||
if [[ ! -z "${pingIP}" ]] && [[ `echo ${pingIP}|grep '^\([1-9]\|[1-9][0-9]\|1[0-9][0-9]\|2[0-4][0-9]\|25[0-5]\)\.\([0-9]\|[1-9][0-9]\|1[0-9][0-9]\|2[0-4][0-9]\|25[0-5]\)\.\([0-9]\|[1-9][0-9]\|1[0-9][0-9]\|2[0-4][0-9]\|25[0-5]\)\.\([0-9]\|[1-9][0-9]\|1[0-9][0-9]\|2[0-4][0-9]\|25[0-5]\)$'` ]]
|
||||
then
|
||||
|
@ -567,6 +574,11 @@ installTLS(){
|
|||
if [[ "${reInstallStatus}" = "y" ]]
|
||||
then
|
||||
rm -rf /etc/v2ray-agent/tls/*
|
||||
if [[ "${tlsStatus}" = "已过期" ]]
|
||||
then
|
||||
rm -rf /root/.acme.sh/${domain}_ecc/*
|
||||
fi
|
||||
|
||||
installTLS $1
|
||||
fi
|
||||
fi
|
||||
|
@ -2590,7 +2602,7 @@ aliasInstall(){
|
|||
|
||||
# 检查ipv6、ipv4
|
||||
checkIPv6(){
|
||||
pingIPv6=`ping -6 -c 1 -W 1000 www.google.com|sed '2{s/[^(]*(//;s/).*//;q;}'|tail -n +2`
|
||||
pingIPv6=`ping6 -c 1 -W 1000 www.google.com|sed '2{s/[^(]*(//;s/).*//;q;}'|tail -n +2`
|
||||
if [[ -z "${pingIPv6}" ]]
|
||||
then
|
||||
echoContent red " ---> 不支持ipv6"
|
||||
|
|
Loading…
Reference in New Issue