From e6874c98d2ec6f4d1ab3f700bbf2fda7ef2018a4 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Sun, 18 Apr 2021 14:37:04 +0800 Subject: [PATCH 1/6] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E6=9F=A5=E7=9C=8B=E6=97=A5=E5=BF=97=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/install.sh b/install.sh index c555664..71bb884 100644 --- a/install.sh +++ b/install.sh @@ -2681,14 +2681,24 @@ checkLog() { if [[ -z ${configPath} ]]; then echoContent red " ---> 没有检测到安装目录,请执行脚本安装内容" fi + local logStatus=false + if [[ -n $(cat ${configPath}00_log.json|grep access) ]];then + logStatus=true + fi + echoContent skyBlue "\n功能 $1/${totalProgress} : 查看日志" echoContent red "\n==============================================================" echoContent yellow "# 建议仅调试打开access日志\n" - echoContent yellow "1.打开access日志" - echoContent yellow "2.关闭access日志" - echoContent yellow "3.监听access日志" - echoContent yellow "4.监听error日志" - echoContent yellow "5.清空日志" + + if [[ "${logStatus}" == "false" ]];then + echoContent yellow "1.打开access日志" + else + echoContent yellow "1.关闭access日志" + fi + + echoContent yellow "2.监听access日志" + echoContent yellow "3.监听error日志" + echoContent yellow "4.清空日志" echoContent red "==============================================================" read -r -p "请选择:" selectAccessLogType @@ -2696,7 +2706,8 @@ checkLog() { case ${selectAccessLogType} in 1) - cat <${configPath}00_log.json + if [[ "${logStatus}" == "false" ]];then + cat <${configPath}00_log.json { "log": { "access":"${configPathLog}access.log", @@ -2704,13 +2715,9 @@ checkLog() { "loglevel": "warning" } } - EOF - reloadCore - checkLog 1 - ;; - 2) - cat <${configPath}00_log.json + elif [[ "${logStatus}" == "true" ]];then + cat <${configPath}00_log.json { "log": { "error": "${configPathLog}error.log", @@ -2718,15 +2725,17 @@ EOF } } EOF + fi reloadCore + checkLog 1 ;; - 3) + 2) tail -f ${configPathLog}access.log ;; - 4) + 3) tail -f ${configPathLog}error.log ;; - 5) + 4) echo >${configPathLog}access.log echo >${configPathLog}error.log ;; @@ -3602,7 +3611,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v2.4.14" + echoContent green "当前版本:v2.4.15" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:七合一共存脚本\c" showInstallStatus From 0f6b6bcddc3f7da9085e8b2e72fef8556a04703a Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Sun, 18 Apr 2021 14:34:08 +0000 Subject: [PATCH 2/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4ccc17a..06e21c4 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,7 @@ /usr/share/nginx/html ``` -## [脚本功能详解、错误处理、常用命令](https://github.com/mack-a/v2ray-agent/blob/master/documents/how_to_use.md) +## [脚本指南](https://github.com/mack-a/v2ray-agent/blob/master/documents/how_to_use.md) ## 安装脚本 From bd20b83efc8c276a3decea3081c532309cdb29c7 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Sun, 18 Apr 2021 14:36:47 +0000 Subject: [PATCH 3/6] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 06e21c4..a2741ce 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,7 @@ - **为了节约时间,反馈请带上详细截图或者按照模版规范,无截图或者不按照规范的issue会被直接关闭** - **不建议GCP用户使用** - **不建议使用Centos以及低版本的系统,2.3.x后不再支持Centos6** +- **[如有使用不明白的地方请先查看脚本使用指南](https://github.com/mack-a/v2ray-agent/blob/master/documents/how_to_use.md)** ## 脚本目录 @@ -136,7 +137,7 @@ /usr/share/nginx/html ``` -## [脚本指南](https://github.com/mack-a/v2ray-agent/blob/master/documents/how_to_use.md) +## [脚本使用指南](https://github.com/mack-a/v2ray-agent/blob/master/documents/how_to_use.md) ## 安装脚本 From 7b762018d0fae1568ebe02d8a9151f274492b6ca Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Sun, 18 Apr 2021 14:40:29 +0000 Subject: [PATCH 4/6] Update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a2741ce..4229195 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,9 @@ - 无需卸载即可安装、重装任意组合 - 支持卸载时保留Nginx、tls证书。如果acme.sh申请的证书有效的情况下,不会重新签发。 - 支持纯IPv6,[IPv6注意事项](https://github.com/mack-a/v2ray-agent/blob/master/documents/IPv6_help.md) -- 支持利用IPv6排除Google的人机验证,**需自己申请IPv6隧道,不建议使用自带的IPv6** +- 支持IPv6分流 +- 支持日志管理 +- 支持多端口配置 - [支持自定义证书安装](https://github.com/mack-a/v2ray-agent/blob/master/documents/install_tls.md) ## 支持的安装类型 @@ -70,6 +72,8 @@ - 10.北联+西伯利亚、伯力ttk/RT - 11.CN2+HE - 12.电信+台湾远传电信 +- 13.CN2+JP NTT +- 14.中转+cloudflare+落地机【可拉全球】 ## 组合推荐 From ffbc0bd85e00b66c54296659e32f52bb110cc694 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Sun, 18 Apr 2021 14:41:41 +0000 Subject: [PATCH 5/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4229195..6c5c309 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,7 @@ ## 安装脚本 -- 支持快捷方式启动,安装完毕后,shell输入[**vasma**]即可打开脚本,脚本执行路径[**/etc/v2ray-agent/install.sh**] +- 支持快捷方式启动,安装完毕后,shell输入【**vasma**】即可打开脚本,脚本执行路径[**/etc/v2ray-agent/install.sh**] - Latest Version From d7d349810ef441be8200340fb5493b8d85997d8b Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Sun, 18 Apr 2021 14:42:42 +0000 Subject: [PATCH 6/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6c5c309..c3278c1 100644 --- a/README.md +++ b/README.md @@ -147,7 +147,7 @@ - 支持快捷方式启动,安装完毕后,shell输入【**vasma**】即可打开脚本,脚本执行路径[**/etc/v2ray-agent/install.sh**] -- Latest Version +- Latest Version【推荐】 ``` wget -P /root -N --no-check-certificate "https://raw.githubusercontent.com/mack-a/v2ray-agent/master/install.sh" && chmod 700 /root/install.sh && /root/install.sh