From cff5fcbcb50c2b3919f473cc565275b389a7bd8d Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Thu, 16 Jan 2020 19:54:16 +0800 Subject: [PATCH 01/71] Create v2ray_update.sh --- v2ray_update.sh | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 v2ray_update.sh diff --git a/v2ray_update.sh b/v2ray_update.sh new file mode 100644 index 0000000..c3fe51c --- /dev/null +++ b/v2ray_update.sh @@ -0,0 +1,50 @@ +#!/bin/bash +#只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件! +#用SSH终端登录路由后台,把这段代码用:vi v2rayupdate.sh 然后:bash v2rayupdate.sh 运行即可 +#By xxx + cd /tmp/tmp + echo + echo -e " $green 正在获取网络最新版信息..$none" + echo + echo -e " $green 只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件!$none" + v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" + sleep 3 + v2ray_ver=v`/usr/bin/v2ray/v2ray -version | grep "V2" | awk '{print $2}'` + #echo $v2ray_ver + echo + if [ $v2ray_ver != $v2ray_latest_ver ]; then + echo + echo -e " $green 咦...发现新版本耶....正在拼命更新.......$none" + echo + v2ray_download_link="https://github.com/v2ray/v2ray-core/releases/download/$v2ray_latest_ver/v2ray-linux-64.zip" + echo + echo + wget "$v2ray_download_link" + unzip -o v2ray-linux-64.zip &> /dev/null + echo + else + echo + echo -e " $green 木有发现新版本....$none" + echo + exit 0 + fi + if [ -e /tmp/tmp/v2ray ]; then + mv -f /tmp/tmp/v2ctl /usr/bin/v2ray + mv -f /tmp/tmp/v2ray /usr/bin/v2ray + chmod 755 /usr/bin/v2ray/v2ctl + chmod 755 /usr/bin/v2ray/v2ray + /etc/init.d/shadowsocksr restart + #/etc/init.d/passwall restart + echo + echo -e " $green 更新成功啦...当前 V2Ray 版本: ${cyan}$v2ray_latest_ver$none" + echo + exit 0 + else + echo -e " + $red 下载 V2Ray 失败啦..可能是你的 VPS 网络太辣鸡了...请重试...$none + " && exit 0 + fi + + + + From 6d8b887d3d7aa8fd424ed3fc692ece141d635bee Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Thu, 16 Jan 2020 20:04:40 +0800 Subject: [PATCH 02/71] Update v2ray_update.sh --- v2ray_update.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index c3fe51c..d77216c 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -1,6 +1,7 @@ #!/bin/bash #只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件! #用SSH终端登录路由后台,把这段代码用:vi v2rayupdate.sh 然后:bash v2rayupdate.sh 运行即可 +# bash -c "$(wget -O- https://git.io/JvUxL)" #By xxx cd /tmp/tmp echo @@ -9,6 +10,8 @@ echo -e " $green 只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件!$none" v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" sleep 3 + #echo $v2ray_latest_ver + ##显示openwrt的v2ray版本号命令: v2ray_ver=v`/usr/bin/v2ray/v2ray -version | grep "V2" | awk '{print $2}'` #echo $v2ray_ver echo @@ -37,6 +40,10 @@ #/etc/init.d/passwall restart echo echo -e " $green 更新成功啦...当前 V2Ray 版本: ${cyan}$v2ray_latest_ver$none" + echo + echo -e " $yellow 温馨提示: 为了避免出现莫名其妙的问题...V2Ray 客户端的版本最好和服务器的版本保持一致$none" + echo + echo -e " $yellow 请到路由后台程序保存应用一下XXSSRplus+,确保成功应用!$none" echo exit 0 else @@ -47,4 +54,3 @@ - From 2f14957c59412e961eb04066c9a9590d423b0784 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Thu, 16 Jan 2020 20:13:40 +0800 Subject: [PATCH 03/71] Update v2ray_update.sh --- v2ray_update.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index d77216c..05dcec0 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -3,15 +3,16 @@ #用SSH终端登录路由后台,把这段代码用:vi v2rayupdate.sh 然后:bash v2rayupdate.sh 运行即可 # bash -c "$(wget -O- https://git.io/JvUxL)" #By xxx - cd /tmp/tmp - echo + cd /tmp/tmp + echo echo -e " $green 正在获取网络最新版信息..$none" echo echo -e " $green 只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件!$none" v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" sleep 3 - #echo $v2ray_latest_ver - ##显示openwrt的v2ray版本号命令: + if [ -n "$v2ray_latest_ver"]; then + echo "请先启动lean大佬的SSRPULS+,并选择v2ray方式启动后再试!" + fi v2ray_ver=v`/usr/bin/v2ray/v2ray -version | grep "V2" | awk '{print $2}'` #echo $v2ray_ver echo @@ -52,5 +53,3 @@ " && exit 0 fi - - From e1f18d28e53e611c6139bf06cd511037e520ac18 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Thu, 16 Jan 2020 20:18:41 +0800 Subject: [PATCH 04/71] Update v2ray_update.sh --- v2ray_update.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index 05dcec0..cf3a847 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -9,12 +9,14 @@ echo echo -e " $green 只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件!$none" v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" - sleep 3 if [ -n "$v2ray_latest_ver"]; then - echo "请先启动lean大佬的SSRPULS+,并选择v2ray方式启动后再试!" + echo "连接GitHub失败,请科学后再试试!" fi + sleep 3 v2ray_ver=v`/usr/bin/v2ray/v2ray -version | grep "V2" | awk '{print $2}'` - #echo $v2ray_ver + if [ -n "$v2ray_ver"]; then + echo "请先启动lean大佬的SSRPULS+,并选择v2ray方式启动后再试!" + fi echo if [ $v2ray_ver != $v2ray_latest_ver ]; then echo @@ -53,3 +55,8 @@ " && exit 0 fi + + + + + From 89365e5c2a0e271c8cc597519cfbd6b709003812 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Thu, 16 Jan 2020 20:40:41 +0800 Subject: [PATCH 05/71] Update v2ray_update.sh --- v2ray_update.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index cf3a847..f7fe2fa 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -4,18 +4,27 @@ # bash -c "$(wget -O- https://git.io/JvUxL)" #By xxx cd /tmp/tmp + echo -e " $green 运行前检查..$none" + echo + st=`ps | grep "passwall" | awk '{print $8}'` && echo ${st: 10:8} + if [ $st = passwall ] + echo " 请先关闭passwall并启动lean大佬的SSRPULS+,并选择v2ray方式启动后再试!" + exit 0 + fi echo echo -e " $green 正在获取网络最新版信息..$none" echo echo -e " $green 只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件!$none" v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" - if [ -n "$v2ray_latest_ver"]; then + sleep 3 + if [ -n "$v2ray_latest_ver" ]; then echo "连接GitHub失败,请科学后再试试!" + exit 0 fi - sleep 3 v2ray_ver=v`/usr/bin/v2ray/v2ray -version | grep "V2" | awk '{print $2}'` - if [ -n "$v2ray_ver"]; then + if [ "$v2ray_ver" = v ]; then echo "请先启动lean大佬的SSRPULS+,并选择v2ray方式启动后再试!" + exit 0 fi echo if [ $v2ray_ver != $v2ray_latest_ver ]; then @@ -57,6 +66,3 @@ - - - From d38ca7553fb2a4dc2bb1b99af075c196d8e3dc07 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Thu, 16 Jan 2020 20:42:36 +0800 Subject: [PATCH 06/71] Update v2ray_update.sh --- v2ray_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index f7fe2fa..22c4424 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -7,7 +7,7 @@ echo -e " $green 运行前检查..$none" echo st=`ps | grep "passwall" | awk '{print $8}'` && echo ${st: 10:8} - if [ $st = passwall ] + if [ $st = passwall ]; then echo " 请先关闭passwall并启动lean大佬的SSRPULS+,并选择v2ray方式启动后再试!" exit 0 fi From 8dfe36645615351aa2ae6826d277e46d8465f197 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Thu, 16 Jan 2020 20:44:43 +0800 Subject: [PATCH 07/71] Update v2ray_update.sh --- v2ray_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index 22c4424..159a527 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -7,7 +7,7 @@ echo -e " $green 运行前检查..$none" echo st=`ps | grep "passwall" | awk '{print $8}'` && echo ${st: 10:8} - if [ $st = passwall ]; then + if [ `echo ${st: 10:8}` = passwall ]; then echo " 请先关闭passwall并启动lean大佬的SSRPULS+,并选择v2ray方式启动后再试!" exit 0 fi From 510159ff73659107f8c79e74da4085d72bd80531 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Thu, 16 Jan 2020 20:47:22 +0800 Subject: [PATCH 08/71] Update v2ray_update.sh --- v2ray_update.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index 159a527..39a4a55 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -8,8 +8,7 @@ echo st=`ps | grep "passwall" | awk '{print $8}'` && echo ${st: 10:8} if [ `echo ${st: 10:8}` = passwall ]; then - echo " 请先关闭passwall并启动lean大佬的SSRPULS+,并选择v2ray方式启动后再试!" - exit 0 + echo -e " 请先关闭passwall并启动lean大佬的SSRPULS+,并选择v2ray方式启动再试! exit " fi echo echo -e " $green 正在获取网络最新版信息..$none" From 7dbb0e44ad34aaf8911d59219ff215f20e0484df Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Thu, 16 Jan 2020 20:50:41 +0800 Subject: [PATCH 09/71] Update v2ray_update.sh --- v2ray_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index 39a4a55..aac3d6a 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -6,7 +6,7 @@ cd /tmp/tmp echo -e " $green 运行前检查..$none" echo - st=`ps | grep "passwall" | awk '{print $8}'` && echo ${st: 10:8} + st=`ps | grep "passwall" | awk '{print $8}'` if [ `echo ${st: 10:8}` = passwall ]; then echo -e " 请先关闭passwall并启动lean大佬的SSRPULS+,并选择v2ray方式启动再试! exit " fi From 2ee0e34fca410438170eebf2547ac823cc198f54 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Thu, 16 Jan 2020 20:52:06 +0800 Subject: [PATCH 10/71] Update v2ray_update.sh --- v2ray_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index aac3d6a..58680b0 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -8,7 +8,7 @@ echo st=`ps | grep "passwall" | awk '{print $8}'` if [ `echo ${st: 10:8}` = passwall ]; then - echo -e " 请先关闭passwall并启动lean大佬的SSRPULS+,并选择v2ray方式启动再试! exit " + echo -e " 请先关闭passwall并启动lean大佬的SSRPULS+,并选择v2ray方式启动再试!"; exit 0 fi echo echo -e " $green 正在获取网络最新版信息..$none" From fe601f76f5adad48b98e36006e39e52edfeff7eb Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Thu, 16 Jan 2020 20:53:09 +0800 Subject: [PATCH 11/71] Update v2ray_update.sh --- v2ray_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index 58680b0..10404f9 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -8,7 +8,7 @@ echo st=`ps | grep "passwall" | awk '{print $8}'` if [ `echo ${st: 10:8}` = passwall ]; then - echo -e " 请先关闭passwall并启动lean大佬的SSRPULS+,并选择v2ray方式启动再试!"; exit 0 + echo -e " 请先关闭passwall并启动lean大佬的SSRPULS+,并选择v2ray方式启动再试!" && exit 0 fi echo echo -e " $green 正在获取网络最新版信息..$none" From aeb6f7a8f7cd63ae914a982d61784262ef3f19a4 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Thu, 16 Jan 2020 20:55:36 +0800 Subject: [PATCH 12/71] Update v2ray_update.sh --- v2ray_update.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index 10404f9..a5b5b4d 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -8,7 +8,8 @@ echo st=`ps | grep "passwall" | awk '{print $8}'` if [ `echo ${st: 10:8}` = passwall ]; then - echo -e " 请先关闭passwall并启动lean大佬的SSRPULS+,并选择v2ray方式启动再试!" && exit 0 + echo -e " 请先关闭passwall并启动lean大佬的SSRPULS+,并选择v2ray方式启动再试!" + exit 0 fi echo echo -e " $green 正在获取网络最新版信息..$none" From cf7e82e8e162d9dd8874ce68e9847fc53c01f63e Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Thu, 16 Jan 2020 20:57:22 +0800 Subject: [PATCH 13/71] Update v2ray_update.sh --- v2ray_update.sh | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index a5b5b4d..91c862c 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -8,8 +8,8 @@ echo st=`ps | grep "passwall" | awk '{print $8}'` if [ `echo ${st: 10:8}` = passwall ]; then - echo -e " 请先关闭passwall并启动lean大佬的SSRPULS+,并选择v2ray方式启动再试!" - exit 0 + echo -e " 请先关闭passwall并启动lean大佬的SSRPULS+,并选择v2ray方式启动再试!" + exit 0 fi echo echo -e " $green 正在获取网络最新版信息..$none" @@ -18,13 +18,13 @@ v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" sleep 3 if [ -n "$v2ray_latest_ver" ]; then - echo "连接GitHub失败,请科学后再试试!" - exit 0 + echo "连接GitHub失败,请科学后再试试!" + exit 0 fi v2ray_ver=v`/usr/bin/v2ray/v2ray -version | grep "V2" | awk '{print $2}'` if [ "$v2ray_ver" = v ]; then - echo "请先启动lean大佬的SSRPULS+,并选择v2ray方式启动后再试!" - exit 0 + echo "请先启动lean大佬的SSRPULS+,并选择v2ray方式启动后再试!" + exit 0 fi echo if [ $v2ray_ver != $v2ray_latest_ver ]; then @@ -63,6 +63,3 @@ $red 下载 V2Ray 失败啦..可能是你的 VPS 网络太辣鸡了...请重试...$none " && exit 0 fi - - - From 4fc7cb4dd3be320375d0591a7e63b60f8b59203d Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Thu, 16 Jan 2020 20:57:48 +0800 Subject: [PATCH 14/71] Update v2ray_update.sh --- v2ray_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index 91c862c..f2795ef 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -2,7 +2,7 @@ #只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件! #用SSH终端登录路由后台,把这段代码用:vi v2rayupdate.sh 然后:bash v2rayupdate.sh 运行即可 # bash -c "$(wget -O- https://git.io/JvUxL)" -#By xxx +#By Len yu cd /tmp/tmp echo -e " $green 运行前检查..$none" echo From 38c01bfd269a1afa065ff2284bd0a7c44b0ad271 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Thu, 16 Jan 2020 21:00:33 +0800 Subject: [PATCH 15/71] Update v2ray_update.sh --- v2ray_update.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index f2795ef..7c8fed4 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -8,21 +8,25 @@ echo st=`ps | grep "passwall" | awk '{print $8}'` if [ `echo ${st: 10:8}` = passwall ]; then + clear echo -e " 请先关闭passwall并启动lean大佬的SSRPULS+,并选择v2ray方式启动再试!" exit 0 fi echo + clear echo -e " $green 正在获取网络最新版信息..$none" echo echo -e " $green 只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件!$none" v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" sleep 3 if [ -n "$v2ray_latest_ver" ]; then + clear echo "连接GitHub失败,请科学后再试试!" exit 0 fi v2ray_ver=v`/usr/bin/v2ray/v2ray -version | grep "V2" | awk '{print $2}'` if [ "$v2ray_ver" = v ]; then + clear echo "请先启动lean大佬的SSRPULS+,并选择v2ray方式启动后再试!" exit 0 fi @@ -49,7 +53,7 @@ chmod 755 /usr/bin/v2ray/v2ctl chmod 755 /usr/bin/v2ray/v2ray /etc/init.d/shadowsocksr restart - #/etc/init.d/passwall restart + clear echo echo -e " $green 更新成功啦...当前 V2Ray 版本: ${cyan}$v2ray_latest_ver$none" echo @@ -59,6 +63,7 @@ echo exit 0 else + clear echo -e " $red 下载 V2Ray 失败啦..可能是你的 VPS 网络太辣鸡了...请重试...$none " && exit 0 From 9b2a16b6146681150335252a76a228a31a43b84e Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Thu, 16 Jan 2020 21:02:20 +0800 Subject: [PATCH 16/71] Update v2ray_update.sh --- v2ray_update.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/v2ray_update.sh b/v2ray_update.sh index 7c8fed4..cf23851 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -9,6 +9,7 @@ st=`ps | grep "passwall" | awk '{print $8}'` if [ `echo ${st: 10:8}` = passwall ]; then clear + echo echo -e " 请先关闭passwall并启动lean大佬的SSRPULS+,并选择v2ray方式启动再试!" exit 0 fi @@ -21,12 +22,14 @@ sleep 3 if [ -n "$v2ray_latest_ver" ]; then clear + echo echo "连接GitHub失败,请科学后再试试!" exit 0 fi v2ray_ver=v`/usr/bin/v2ray/v2ray -version | grep "V2" | awk '{print $2}'` if [ "$v2ray_ver" = v ]; then clear + echo echo "请先启动lean大佬的SSRPULS+,并选择v2ray方式启动后再试!" exit 0 fi @@ -64,6 +67,7 @@ exit 0 else clear + echo echo -e " $red 下载 V2Ray 失败啦..可能是你的 VPS 网络太辣鸡了...请重试...$none " && exit 0 From f1cb949acaef408bbad1e83b81195b5d162ef046 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Thu, 16 Jan 2020 21:04:46 +0800 Subject: [PATCH 17/71] Update v2ray_update.sh --- v2ray_update.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index cf23851..5677f76 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -5,30 +5,27 @@ #By Len yu cd /tmp/tmp echo -e " $green 运行前检查..$none" + clear + echo echo st=`ps | grep "passwall" | awk '{print $8}'` if [ `echo ${st: 10:8}` = passwall ]; then - clear - echo echo -e " 请先关闭passwall并启动lean大佬的SSRPULS+,并选择v2ray方式启动再试!" exit 0 fi echo - clear echo -e " $green 正在获取网络最新版信息..$none" echo echo -e " $green 只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件!$none" v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" sleep 3 if [ -n "$v2ray_latest_ver" ]; then - clear echo echo "连接GitHub失败,请科学后再试试!" exit 0 fi v2ray_ver=v`/usr/bin/v2ray/v2ray -version | grep "V2" | awk '{print $2}'` if [ "$v2ray_ver" = v ]; then - clear echo echo "请先启动lean大佬的SSRPULS+,并选择v2ray方式启动后再试!" exit 0 @@ -56,7 +53,6 @@ chmod 755 /usr/bin/v2ray/v2ctl chmod 755 /usr/bin/v2ray/v2ray /etc/init.d/shadowsocksr restart - clear echo echo -e " $green 更新成功啦...当前 V2Ray 版本: ${cyan}$v2ray_latest_ver$none" echo @@ -66,7 +62,6 @@ echo exit 0 else - clear echo echo -e " $red 下载 V2Ray 失败啦..可能是你的 VPS 网络太辣鸡了...请重试...$none From 099baa06ee04eb88647c904b20b1d1509d759461 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Thu, 16 Jan 2020 21:13:31 +0800 Subject: [PATCH 18/71] Update v2ray_update.sh --- v2ray_update.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index 5677f76..a8bce97 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -8,7 +8,7 @@ clear echo echo - st=`ps | grep "passwall" | awk '{print $8}'` + st=`ps | grep "passwall" | awk '{print $8}'` &> dev>null if [ `echo ${st: 10:8}` = passwall ]; then echo -e " 请先关闭passwall并启动lean大佬的SSRPULS+,并选择v2ray方式启动再试!" exit 0 @@ -21,6 +21,8 @@ sleep 3 if [ -n "$v2ray_latest_ver" ]; then echo + clear + echo echo "连接GitHub失败,请科学后再试试!" exit 0 fi From 399724631d90739b8a0e8de6d23de9cd41928a0b Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Thu, 16 Jan 2020 21:16:33 +0800 Subject: [PATCH 19/71] Update v2ray_update.sh --- v2ray_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index a8bce97..ef835af 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -19,7 +19,7 @@ echo -e " $green 只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件!$none" v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" sleep 3 - if [ -n "$v2ray_latest_ver" ]; then + if [ "$v2ray_latest_ver" ! = v* ]; then echo clear echo From ac7498392acce8a431e1ade6e42746cd39fbf1c6 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Thu, 16 Jan 2020 21:18:48 +0800 Subject: [PATCH 20/71] Update v2ray_update.sh --- v2ray_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index ef835af..6d6153e 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -19,7 +19,7 @@ echo -e " $green 只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件!$none" v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" sleep 3 - if [ "$v2ray_latest_ver" ! = v* ]; then + if [ "$v2ray_latest_ver" != v* ]; then echo clear echo From a024bc22474aa8d78f0932273f050af5e7379120 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Thu, 16 Jan 2020 21:27:31 +0800 Subject: [PATCH 21/71] Update v2ray_update.sh --- v2ray_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index 6d6153e..6e6ac44 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -19,7 +19,7 @@ echo -e " $green 只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件!$none" v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" sleep 3 - if [ "$v2ray_latest_ver" != v* ]; then + if [ -n $v2ray_latest_ver ]; then echo clear echo From c8f20db95c24adf7e74fc936dd90f4605c91b5ad Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Thu, 16 Jan 2020 21:29:34 +0800 Subject: [PATCH 22/71] Update v2ray_update.sh --- v2ray_update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index 6e6ac44..837c8a3 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -23,8 +23,8 @@ echo clear echo - echo "连接GitHub失败,请科学后再试试!" - exit 0 + #echo "连接GitHub失败,请科学后再试试!" + #exit 0 fi v2ray_ver=v`/usr/bin/v2ray/v2ray -version | grep "V2" | awk '{print $2}'` if [ "$v2ray_ver" = v ]; then From 310bc1600f6f2c56d6b98a7be416606ede65d04e Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 04:17:06 +0800 Subject: [PATCH 23/71] Update v2ray_update.sh --- v2ray_update.sh | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index 837c8a3..6cc8037 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -8,10 +8,21 @@ clear echo echo - st=`ps | grep "passwall" | awk '{print $8}'` &> dev>null + st=`ps | grep "passwall" | awk '{print $8}'` if [ `echo ${st: 10:8}` = passwall ]; then echo -e " 请先关闭passwall并启动lean大佬的SSRPULS+,并选择v2ray方式启动再试!" + echo + exit 0 + fi + echo + sr=`ps -ef | grep "/var/etc/v2-ssr" | awk '{print $7}'` &> /dev/null + if [ "$sr" != "/var/etc/v2-ssr-retcp.json" ]; then + clear + echo + echo -e " $green 请先启动lean大佬的SSRPULS+,并选择v2ray方式启动后再试!$none" exit 0 + echo + echo fi echo echo -e " $green 正在获取网络最新版信息..$none" @@ -19,19 +30,11 @@ echo -e " $green 只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件!$none" v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" sleep 3 - if [ -n $v2ray_latest_ver ]; then + if [ -n "$v2ray_latest_ver" ]; then echo - clear - echo #echo "连接GitHub失败,请科学后再试试!" #exit 0 fi - v2ray_ver=v`/usr/bin/v2ray/v2ray -version | grep "V2" | awk '{print $2}'` - if [ "$v2ray_ver" = v ]; then - echo - echo "请先启动lean大佬的SSRPULS+,并选择v2ray方式启动后再试!" - exit 0 - fi echo if [ $v2ray_ver != $v2ray_latest_ver ]; then echo From 5f3ee87bf1060613587a5209d92a6e887c6d626d Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 04:22:10 +0800 Subject: [PATCH 24/71] Update v2ray_update.sh --- v2ray_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index 6cc8037..e319f59 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -16,7 +16,7 @@ fi echo sr=`ps -ef | grep "/var/etc/v2-ssr" | awk '{print $7}'` &> /dev/null - if [ "$sr" != "/var/etc/v2-ssr-retcp.json" ]; then + if [ $sr != "/var/etc/v2-ssr-retcp.json" ]; then clear echo echo -e " $green 请先启动lean大佬的SSRPULS+,并选择v2ray方式启动后再试!$none" From ba12c2370d9d01ca26b5fb961d1d0a4816de8e7a Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 04:27:11 +0800 Subject: [PATCH 25/71] Update v2ray_update.sh --- v2ray_update.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index e319f59..6ffc87c 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -16,13 +16,14 @@ fi echo sr=`ps -ef | grep "/var/etc/v2-ssr" | awk '{print $7}'` &> /dev/null + echo if [ $sr != "/var/etc/v2-ssr-retcp.json" ]; then clear echo echo -e " $green 请先启动lean大佬的SSRPULS+,并选择v2ray方式启动后再试!$none" exit 0 echo - echo + echo fi echo echo -e " $green 正在获取网络最新版信息..$none" From 149051adaaf9af988084ee696f3feee2a2648faa Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 04:30:41 +0800 Subject: [PATCH 26/71] Update v2ray_update.sh --- v2ray_update.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index 6ffc87c..3070ede 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -8,7 +8,8 @@ clear echo echo - st=`ps | grep "passwall" | awk '{print $8}'` + st=`ps | grep "passwall" | awk '{print $8}'` &> /dev/null + sleep 1 if [ `echo ${st: 10:8}` = passwall ]; then echo -e " 请先关闭passwall并启动lean大佬的SSRPULS+,并选择v2ray方式启动再试!" echo @@ -26,9 +27,9 @@ echo fi echo - echo -e " $green 正在获取网络最新版信息..$none" + echo -e " $green 1.正在获取网络最新版信息..$none" echo - echo -e " $green 只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件!$none" + echo -e " $green 2.只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件!$none" v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" sleep 3 if [ -n "$v2ray_latest_ver" ]; then From d794d80ae5362707e8cc0d9a6c991e6734f88db2 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 04:36:52 +0800 Subject: [PATCH 27/71] Update v2ray_update.sh --- v2ray_update.sh | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index 3070ede..3f68e2c 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -8,9 +8,8 @@ clear echo echo - st=`ps | grep "passwall" | awk '{print $8}'` &> /dev/null - sleep 1 - if [ `echo ${st: 10:8}` = passwall ]; then + st=0`ps | grep "passwall" | awk '{print $8}'` &> /dev/null + if [ 0`echo ${st: 10:8}` = 0passwall ]; then echo -e " 请先关闭passwall并启动lean大佬的SSRPULS+,并选择v2ray方式启动再试!" echo exit 0 @@ -32,12 +31,6 @@ echo -e " $green 2.只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件!$none" v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" sleep 3 - if [ -n "$v2ray_latest_ver" ]; then - echo - #echo "连接GitHub失败,请科学后再试试!" - #exit 0 - fi - echo if [ $v2ray_ver != $v2ray_latest_ver ]; then echo echo -e " $green 咦...发现新版本耶....正在拼命更新.......$none" From dba645324eff126a0e500e4faf23cf4d13c4e34c Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 04:39:38 +0800 Subject: [PATCH 28/71] Update v2ray_update.sh --- v2ray_update.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index 3f68e2c..b2f7a24 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -22,16 +22,13 @@ echo echo -e " $green 请先启动lean大佬的SSRPULS+,并选择v2ray方式启动后再试!$none" exit 0 - echo - echo fi - echo echo -e " $green 1.正在获取网络最新版信息..$none" echo echo -e " $green 2.只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件!$none" v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" sleep 3 - if [ $v2ray_ver != $v2ray_latest_ver ]; then + if [ 0$v2ray_ver != 0$v2ray_latest_ver ]; then echo echo -e " $green 咦...发现新版本耶....正在拼命更新.......$none" echo From a9b1ac829d4cfddfda95dd0f280a9e667cfde58d Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 04:41:52 +0800 Subject: [PATCH 29/71] Update v2ray_update.sh --- v2ray_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index b2f7a24..a9051df 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -27,7 +27,7 @@ echo echo -e " $green 2.只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件!$none" v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" - sleep 3 + sleep 3 &> /dev/null if [ 0$v2ray_ver != 0$v2ray_latest_ver ]; then echo echo -e " $green 咦...发现新版本耶....正在拼命更新.......$none" From cb5cc95601ceae1d151a2ebb56b87e24570fc60d Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 04:45:09 +0800 Subject: [PATCH 30/71] Update v2ray_update.sh --- v2ray_update.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index a9051df..f9bde06 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -27,8 +27,9 @@ echo echo -e " $green 2.只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件!$none" v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" - sleep 3 &> /dev/null - if [ 0$v2ray_ver != 0$v2ray_latest_ver ]; then + sleep 2 + if [ $v2ray_ver != $v2ray_latest_ver ]; then + clear echo echo -e " $green 咦...发现新版本耶....正在拼命更新.......$none" echo @@ -39,6 +40,7 @@ unzip -o v2ray-linux-64.zip &> /dev/null echo else + clear echo echo -e " $green 木有发现新版本....$none" echo From 50a7b50623c49ef0f02c73dc0502cc93eb93c9f7 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 04:48:32 +0800 Subject: [PATCH 31/71] Update v2ray_update.sh --- v2ray_update.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/v2ray_update.sh b/v2ray_update.sh index f9bde06..8794a85 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -4,6 +4,7 @@ # bash -c "$(wget -O- https://git.io/JvUxL)" #By Len yu cd /tmp/tmp + rm -rf * echo -e " $green 运行前检查..$none" clear echo From 6742bcfc239763c284880cadd526978b62b558f5 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 04:54:08 +0800 Subject: [PATCH 32/71] Update v2ray_update.sh --- v2ray_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index 8794a85..65a9c7b 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -1,7 +1,7 @@ #!/bin/bash #只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件! #用SSH终端登录路由后台,把这段代码用:vi v2rayupdate.sh 然后:bash v2rayupdate.sh 运行即可 -# bash -c "$(wget -O- https://git.io/JvUxL)" +# bash -c "$(wget -O- https://git.io/JvTOE)" #By Len yu cd /tmp/tmp rm -rf * From d0cab87631b9a29cf59a061098f0f54afe22d1ab Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 04:56:34 +0800 Subject: [PATCH 33/71] Update v2ray_update.sh From acc37e1123b05def5855fb08a9b83a7ab6930287 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 04:58:08 +0800 Subject: [PATCH 34/71] Update v2ray_update.sh --- v2ray_update.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index 65a9c7b..e84a9fa 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -17,7 +17,6 @@ fi echo sr=`ps -ef | grep "/var/etc/v2-ssr" | awk '{print $7}'` &> /dev/null - echo if [ $sr != "/var/etc/v2-ssr-retcp.json" ]; then clear echo @@ -27,8 +26,7 @@ echo -e " $green 1.正在获取网络最新版信息..$none" echo echo -e " $green 2.只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件!$none" - v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" - sleep 2 + v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" && sleep 2 if [ $v2ray_ver != $v2ray_latest_ver ]; then clear echo From b20760f89ea8a87c1c219d9ea2b865e352999db4 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 04:59:59 +0800 Subject: [PATCH 35/71] Update v2ray_update.sh --- v2ray_update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index e84a9fa..d4a8471 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -17,7 +17,7 @@ fi echo sr=`ps -ef | grep "/var/etc/v2-ssr" | awk '{print $7}'` &> /dev/null - if [ $sr != "/var/etc/v2-ssr-retcp.json" ]; then + if [ 0$sr != "0/var/etc/v2-ssr-retcp.json" ]; then clear echo echo -e " $green 请先启动lean大佬的SSRPULS+,并选择v2ray方式启动后再试!$none" @@ -27,7 +27,7 @@ echo echo -e " $green 2.只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件!$none" v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" && sleep 2 - if [ $v2ray_ver != $v2ray_latest_ver ]; then + if [ 0$v2ray_ver != 0$v2ray_latest_ver ]; then clear echo echo -e " $green 咦...发现新版本耶....正在拼命更新.......$none" From 9c317eff09e66b84c824672a8e26e485a39ad732 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 05:08:23 +0800 Subject: [PATCH 36/71] Update v2ray_update.sh --- v2ray_update.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/v2ray_update.sh b/v2ray_update.sh index d4a8471..3d375c7 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -27,6 +27,7 @@ echo echo -e " $green 2.只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件!$none" v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" && sleep 2 + v2ray_ver=v`/usr/bin/v2ray/v2ray -version | grep "V2" | awk '{print $2}'` &> /dev/null if [ 0$v2ray_ver != 0$v2ray_latest_ver ]; then clear echo From 057cfe8d7dc48747bb7bb80c157857d108530089 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 05:10:49 +0800 Subject: [PATCH 37/71] Update v2ray_update.sh --- v2ray_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index 3d375c7..d28d443 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -28,7 +28,7 @@ echo -e " $green 2.只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件!$none" v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" && sleep 2 v2ray_ver=v`/usr/bin/v2ray/v2ray -version | grep "V2" | awk '{print $2}'` &> /dev/null - if [ 0$v2ray_ver != 0$v2ray_latest_ver ]; then + if [ $v2ray_ver != $v2ray_latest_ver ]; then clear echo echo -e " $green 咦...发现新版本耶....正在拼命更新.......$none" From 95b2a95a633b7d6f8f0144330a8327cb70245238 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 05:11:49 +0800 Subject: [PATCH 38/71] Update v2ray_update.sh --- v2ray_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index d28d443..4419d8c 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -17,7 +17,7 @@ fi echo sr=`ps -ef | grep "/var/etc/v2-ssr" | awk '{print $7}'` &> /dev/null - if [ 0$sr != "0/var/etc/v2-ssr-retcp.json" ]; then + if [ $sr != "/var/etc/v2-ssr-retcp.json" ]; then clear echo echo -e " $green 请先启动lean大佬的SSRPULS+,并选择v2ray方式启动后再试!$none" From 4165cc180a62cdc95d1ed9ef42d831ebb81936d7 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 05:14:52 +0800 Subject: [PATCH 39/71] Update v2ray_update.sh --- v2ray_update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index 4419d8c..b63a8d0 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -9,8 +9,8 @@ clear echo echo - st=0`ps | grep "passwall" | awk '{print $8}'` &> /dev/null - if [ 0`echo ${st: 10:8}` = 0passwall ]; then + st=`ps | grep "passwall" | awk '{print $8}'` &> /dev/null + if [ `echo ${st: 10:8}` = passwall ]; then echo -e " 请先关闭passwall并启动lean大佬的SSRPULS+,并选择v2ray方式启动再试!" echo exit 0 From f98f686e47cd01d249bc7681eb0cdb79912054bf Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 05:16:25 +0800 Subject: [PATCH 40/71] Update v2ray_update.sh --- v2ray_update.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index b63a8d0..19c2d28 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -9,15 +9,15 @@ clear echo echo - st=`ps | grep "passwall" | awk '{print $8}'` &> /dev/null - if [ `echo ${st: 10:8}` = passwall ]; then + st=0`ps | grep "passwall" | awk '{print $8}'` &> /dev/null + if [ 0`echo ${st: 10:8}` = 0passwall ]; then echo -e " 请先关闭passwall并启动lean大佬的SSRPULS+,并选择v2ray方式启动再试!" echo exit 0 fi echo - sr=`ps -ef | grep "/var/etc/v2-ssr" | awk '{print $7}'` &> /dev/null - if [ $sr != "/var/etc/v2-ssr-retcp.json" ]; then + sr=0`ps -ef | grep "/var/etc/v2-ssr" | awk '{print $7}'` &> /dev/null + if [ $sr != "0/var/etc/v2-ssr-retcp.json" ]; then clear echo echo -e " $green 请先启动lean大佬的SSRPULS+,并选择v2ray方式启动后再试!$none" From d98a73dfc13612daeb4c48535f34bed6c53f6f80 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 05:35:31 +0800 Subject: [PATCH 41/71] Update v2ray_update.sh --- v2ray_update.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index 19c2d28..056b7eb 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -1,6 +1,5 @@ #!/bin/bash #只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件! -#用SSH终端登录路由后台,把这段代码用:vi v2rayupdate.sh 然后:bash v2rayupdate.sh 运行即可 # bash -c "$(wget -O- https://git.io/JvTOE)" #By Len yu cd /tmp/tmp From 7606bdf91e195502a8d64f20aeaf80c6e2584913 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 05:42:26 +0800 Subject: [PATCH 42/71] Update v2ray_update.sh --- v2ray_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index 056b7eb..1478faf 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -52,7 +52,7 @@ chmod 755 /usr/bin/v2ray/v2ray /etc/init.d/shadowsocksr restart echo - echo -e " $green 更新成功啦...当前 V2Ray 版本: ${cyan}$v2ray_latest_ver$none" + echo -e " $green 更新成功啦...当前 V2Ray 版本: ${cyan}$v2ray_latest_ver$none" echo echo -e " $yellow 温馨提示: 为了避免出现莫名其妙的问题...V2Ray 客户端的版本最好和服务器的版本保持一致$none" echo From d26b78190b7678433dc951c965e51c23801246ff Mon Sep 17 00:00:00 2001 From: Blue planet <30463977+Blueplanet20120@users.noreply.github.com> Date: Fri, 17 Jan 2020 17:30:48 +0800 Subject: [PATCH 43/71] Update v2ray_update.sh --- v2ray_update.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index 1478faf..98d30a8 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -54,9 +54,8 @@ echo echo -e " $green 更新成功啦...当前 V2Ray 版本: ${cyan}$v2ray_latest_ver$none" echo - echo -e " $yellow 温馨提示: 为了避免出现莫名其妙的问题...V2Ray 客户端的版本最好和服务器的版本保持一致$none" + echo -e " $yellow 温馨提示: 为了避免出现莫名其妙的问题...V2Ray 服务端的版本最好和服务器的版本保持一致$none" echo - echo -e " $yellow 请到路由后台程序保存应用一下XXSSRplus+,确保成功应用!$none" echo exit 0 else From 549ea236c2234df297236d443d3d437b52e58d7d Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 17:52:11 +0800 Subject: [PATCH 44/71] Update v2ray_update.sh --- v2ray_update.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index 98d30a8..a485036 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -8,15 +8,16 @@ clear echo echo - st=0`ps | grep "passwall" | awk '{print $8}'` &> /dev/null - if [ 0`echo ${st: 10:8}` = 0passwall ]; then + st="`ps | grep "passwall" | awk '{print $8}'`" &> /dev/null + if [ "`echo ${st: 10:8}`" = "passwall" ]; then echo -e " 请先关闭passwall并启动lean大佬的SSRPULS+,并选择v2ray方式启动再试!" echo exit 0 fi echo - sr=0`ps -ef | grep "/var/etc/v2-ssr" | awk '{print $7}'` &> /dev/null - if [ $sr != "0/var/etc/v2-ssr-retcp.json" ]; then + sr="`ps -ef | grep "/var/etc/v2-ssr" | awk '{print $7}'`" &> /dev/null + #sr="$(ps -ef | grep "/var/etc/v2-ssr" | awk '{print $7}')" + if [ $sr != "/var/etc/v2-ssr-retcp.json" ]; then clear echo echo -e " $green 请先启动lean大佬的SSRPULS+,并选择v2ray方式启动后再试!$none" @@ -25,9 +26,11 @@ echo -e " $green 1.正在获取网络最新版信息..$none" echo echo -e " $green 2.只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件!$none" + #curl -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep "tag_name" | cut -d\" -f4 v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" && sleep 2 - v2ray_ver=v`/usr/bin/v2ray/v2ray -version | grep "V2" | awk '{print $2}'` &> /dev/null - if [ $v2ray_ver != $v2ray_latest_ver ]; then + v2ray_ver="v`/usr/bin/v2ray/v2ray -version | grep "V2" | awk '{print $2}'`" &> /dev/null + #v2ray_ver="v$(/usr/bin/v2ray/v2ray -version | grep "V2" | awk '{print $2}')" &> /dev/null + if [ "$v2ray_ver" != "$v2ray_latest_ver" ]; then clear echo echo -e " $green 咦...发现新版本耶....正在拼命更新.......$none" @@ -54,7 +57,7 @@ echo echo -e " $green 更新成功啦...当前 V2Ray 版本: ${cyan}$v2ray_latest_ver$none" echo - echo -e " $yellow 温馨提示: 为了避免出现莫名其妙的问题...V2Ray 服务端的版本最好和服务器的版本保持一致$none" + echo -e " $yellow 温馨提示: 为了避免出现莫名其妙的问题...V2Ray 客户端的版本最好和服务器的版本保持一致$none" echo echo exit 0 From 76f1835c9341122185d7799560398607094627a7 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 18:15:06 +0800 Subject: [PATCH 45/71] Update v2ray_update.sh --- v2ray_update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index a485036..02e3467 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -51,8 +51,8 @@ if [ -e /tmp/tmp/v2ray ]; then mv -f /tmp/tmp/v2ctl /usr/bin/v2ray mv -f /tmp/tmp/v2ray /usr/bin/v2ray - chmod 755 /usr/bin/v2ray/v2ctl - chmod 755 /usr/bin/v2ray/v2ray + chmod a+x /usr/bin/v2ray/v2ctl + chmod a+x /usr/bin/v2ray/v2ray /etc/init.d/shadowsocksr restart echo echo -e " $green 更新成功啦...当前 V2Ray 版本: ${cyan}$v2ray_latest_ver$none" From ff89c67dded0b3ee7fdcbfb082fa1e279ac09994 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 18:20:45 +0800 Subject: [PATCH 46/71] Update v2ray_update.sh --- v2ray_update.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/v2ray_update.sh b/v2ray_update.sh index 02e3467..9a3069a 100644 --- a/v2ray_update.sh +++ b/v2ray_update.sh @@ -17,7 +17,7 @@ echo sr="`ps -ef | grep "/var/etc/v2-ssr" | awk '{print $7}'`" &> /dev/null #sr="$(ps -ef | grep "/var/etc/v2-ssr" | awk '{print $7}')" - if [ $sr != "/var/etc/v2-ssr-retcp.json" ]; then + if [ "$sr" != "/var/etc/v2-ssr-retcp.json" ]; then clear echo echo -e " $green 请先启动lean大佬的SSRPULS+,并选择v2ray方式启动后再试!$none" @@ -51,8 +51,8 @@ if [ -e /tmp/tmp/v2ray ]; then mv -f /tmp/tmp/v2ctl /usr/bin/v2ray mv -f /tmp/tmp/v2ray /usr/bin/v2ray - chmod a+x /usr/bin/v2ray/v2ctl - chmod a+x /usr/bin/v2ray/v2ray + chmod 755 /usr/bin/v2ray/v2ctl + chmod 755 /usr/bin/v2ray/v2ray /etc/init.d/shadowsocksr restart echo echo -e " $green 更新成功啦...当前 V2Ray 版本: ${cyan}$v2ray_latest_ver$none" From 1e620aa8b1673ede6dd2ae35e889def480d5122c Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 19:56:07 +0800 Subject: [PATCH 47/71] Create v2_update.sh --- v2_update.sh | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 v2_update.sh diff --git a/v2_update.sh b/v2_update.sh new file mode 100644 index 0000000..bbaedfb --- /dev/null +++ b/v2_update.sh @@ -0,0 +1,71 @@ +#!/bin/bash +#只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件! +# bash -c "$(wget -O- https://git.io/JvTOE)" +#Version: v2.0.1 By Len yu. +cd /tmp/tmp +rm -rf * +echo -e " $green Version: v2.0.1 By Len yu.$none" +echo +echo -e " $green 2.只能x86-64的openwrt系统上,可更新lean大佬的XXXPLUS和passwall的v2插件!$none" +sleep 1 +clear +echo +echo -e " $green 1.正在获取网络v2ray最新版信息..$none" +echo +#judgment +v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" +sleep 2 +v2ray_ver="v$(/usr/bin/v2ray/v2ray -version | grep "V2" | awk '{print $2}')" &> /dev/null +if [ "$v2ray_ver" != "$v2ray_latest_ver" ]; then + clear + echo + echo -e " $green 咦...发现新版本耶....正在拼命更新.......$none" + echo + v2ray_download_link="https://github.com/v2ray/v2ray-core/releases/download/$v2ray_latest_ver/v2ray-linux-64.zip" + echo + echo + wget "$v2ray_download_link" + unzip -o v2ray-linux-64.zip &> /dev/null + echo +else + clear + echo + echo -e " $green 木有发现新版本....$none" + echo + exit 0 +fi +##install +st="`ps | grep "passwall" | awk '{print $8}'`" &> /dev/null +sr="$(ps -ef | grep "/var/etc/v2-ssr" | awk '{print $7}')" &> /dev/null +if [[ "`echo ${st: 10:8}`" = "passwall" && -e /tmp/tmp/v2ray ]]; then + mv -f /tmp/tmp/v2ctl /usr/bin/v2ray + mv -f /tmp/tmp/v2ray /usr/bin/v2ray + chmod 755 /usr/bin/v2ray/v2ctl + chmod 755 /usr/bin/v2ray/v2ray + /etc/init.d/passwall restart + echo + echo -e " $green 更新成功啦...当前 V2Ray 版本: ${cyan}$v2ray_latest_ver$none" + echo + echo -e " $yellow 温馨提示: 为了避免出现莫名其妙的问题...V2Ray路由端的版本最好和服务器的版本保持一致$none" + echo + echo + exit 0 +elif [[ "$sr" = "/var/etc/v2-ssr-retcp.json" && -e /tmp/tmp/v2ray ]]; then + mv -f /tmp/tmp/v2ctl /usr/bin/v2ray + mv -f /tmp/tmp/v2ray /usr/bin/v2ray + chmod 755 /usr/bin/v2ray/v2ctl + chmod 755 /usr/bin/v2ray/v2ray + /etc/init.d/shadowsocksr restart + echo + echo -e " $green 更新成功啦...当前 V2Ray 版本: ${cyan}$v2ray_latest_ver$none" + echo + echo -e " $yellow 温馨提示: 为了避免出现莫名其妙的问题...V2Ray路由端的版本最好和服务器的版本保持一致$none" + echo + echo + exit 0 +else + echo + echo -e " + $red 下载 V2Ray 失败啦..可能是你的 VPS 网络太辣鸡了...请重试...$none + " && exit 0 +fi From 274d62d97d775f0b613be25cf3381da260e297e6 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 19:57:00 +0800 Subject: [PATCH 48/71] Update v2_update.sh --- v2_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2_update.sh b/v2_update.sh index bbaedfb..1cdd073 100644 --- a/v2_update.sh +++ b/v2_update.sh @@ -1,6 +1,6 @@ #!/bin/bash #只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件! -# bash -c "$(wget -O- https://git.io/JvTOE)" +# bash -c "$(wget -O- https://git.io/JvTVT)" #Version: v2.0.1 By Len yu. cd /tmp/tmp rm -rf * From 7cf8f971e824d2ed258ef79085c0fe81274f71b9 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 19:59:34 +0800 Subject: [PATCH 49/71] Update v2_update.sh --- v2_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2_update.sh b/v2_update.sh index 1cdd073..3311288 100644 --- a/v2_update.sh +++ b/v2_update.sh @@ -7,7 +7,7 @@ rm -rf * echo -e " $green Version: v2.0.1 By Len yu.$none" echo echo -e " $green 2.只能x86-64的openwrt系统上,可更新lean大佬的XXXPLUS和passwall的v2插件!$none" -sleep 1 +sleep 2 clear echo echo -e " $green 1.正在获取网络v2ray最新版信息..$none" From e48182103583d50b607bf5eab61a552ae5633641 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 20:00:33 +0800 Subject: [PATCH 50/71] Update v2_update.sh --- v2_update.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/v2_update.sh b/v2_update.sh index 3311288..ee4d24e 100644 --- a/v2_update.sh +++ b/v2_update.sh @@ -4,6 +4,7 @@ #Version: v2.0.1 By Len yu. cd /tmp/tmp rm -rf * +echo echo -e " $green Version: v2.0.1 By Len yu.$none" echo echo -e " $green 2.只能x86-64的openwrt系统上,可更新lean大佬的XXXPLUS和passwall的v2插件!$none" From 2e7e16d5934cce47999093f4a776ea46eaeebf93 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 20:01:18 +0800 Subject: [PATCH 51/71] Update v2_update.sh --- v2_update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v2_update.sh b/v2_update.sh index ee4d24e..cc59051 100644 --- a/v2_update.sh +++ b/v2_update.sh @@ -7,11 +7,11 @@ rm -rf * echo echo -e " $green Version: v2.0.1 By Len yu.$none" echo -echo -e " $green 2.只能x86-64的openwrt系统上,可更新lean大佬的XXXPLUS和passwall的v2插件!$none" +echo -e " $green 只能x86-64的openwrt系统上,可更新lean大佬的XXXPLUS和passwall的v2插件!$none" sleep 2 clear echo -echo -e " $green 1.正在获取网络v2ray最新版信息..$none" +echo -e " $green 正在获取网络v2ray最新版信息..$none" echo #judgment v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" From fb77c726821a7761186d0a4af2e4111d4fe4b5c5 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 20:13:59 +0800 Subject: [PATCH 52/71] Update v2_update.sh --- v2_update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v2_update.sh b/v2_update.sh index cc59051..8672962 100644 --- a/v2_update.sh +++ b/v2_update.sh @@ -45,7 +45,7 @@ if [[ "`echo ${st: 10:8}`" = "passwall" && -e /tmp/tmp/v2ray ]]; then chmod 755 /usr/bin/v2ray/v2ray /etc/init.d/passwall restart echo - echo -e " $green 更新成功啦...当前 V2Ray 版本: ${cyan}$v2ray_latest_ver$none" + echo -e " $green 更新成功啦...当前 V2Ray 版本: ${cyan}$v2ray_latest_ver$none" echo echo -e " $yellow 温馨提示: 为了避免出现莫名其妙的问题...V2Ray路由端的版本最好和服务器的版本保持一致$none" echo @@ -58,7 +58,7 @@ elif [[ "$sr" = "/var/etc/v2-ssr-retcp.json" && -e /tmp/tmp/v2ray ]]; then chmod 755 /usr/bin/v2ray/v2ray /etc/init.d/shadowsocksr restart echo - echo -e " $green 更新成功啦...当前 V2Ray 版本: ${cyan}$v2ray_latest_ver$none" + echo -e " $green 更新成功啦...当前 V2Ray 版本: ${cyan}$v2ray_latest_ver$none" echo echo -e " $yellow 温馨提示: 为了避免出现莫名其妙的问题...V2Ray路由端的版本最好和服务器的版本保持一致$none" echo From 951f667bb3d940ffc4ba63d7d9f43b595cf17baa Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 20:29:03 +0800 Subject: [PATCH 53/71] Update v2_update.sh --- v2_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2_update.sh b/v2_update.sh index 8672962..60a5e44 100644 --- a/v2_update.sh +++ b/v2_update.sh @@ -1,5 +1,5 @@ #!/bin/bash -#只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件! +#只能x86-64的openwrt系统上,能lean大佬的XXXPLUS和passwall的v2插件 # bash -c "$(wget -O- https://git.io/JvTVT)" #Version: v2.0.1 By Len yu. cd /tmp/tmp From f6b3fc6df94ccef41b2c8b319f2b13fbd4c88fa2 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 20:30:05 +0800 Subject: [PATCH 54/71] Delete v2ray_update.sh --- v2ray_update.sh | 69 ------------------------------------------------- 1 file changed, 69 deletions(-) delete mode 100644 v2ray_update.sh diff --git a/v2ray_update.sh b/v2ray_update.sh deleted file mode 100644 index 9a3069a..0000000 --- a/v2ray_update.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash -#只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件! -# bash -c "$(wget -O- https://git.io/JvTOE)" -#By Len yu - cd /tmp/tmp - rm -rf * - echo -e " $green 运行前检查..$none" - clear - echo - echo - st="`ps | grep "passwall" | awk '{print $8}'`" &> /dev/null - if [ "`echo ${st: 10:8}`" = "passwall" ]; then - echo -e " 请先关闭passwall并启动lean大佬的SSRPULS+,并选择v2ray方式启动再试!" - echo - exit 0 - fi - echo - sr="`ps -ef | grep "/var/etc/v2-ssr" | awk '{print $7}'`" &> /dev/null - #sr="$(ps -ef | grep "/var/etc/v2-ssr" | awk '{print $7}')" - if [ "$sr" != "/var/etc/v2-ssr-retcp.json" ]; then - clear - echo - echo -e " $green 请先启动lean大佬的SSRPULS+,并选择v2ray方式启动后再试!$none" - exit 0 - fi - echo -e " $green 1.正在获取网络最新版信息..$none" - echo - echo -e " $green 2.只能x86-64的openwrt系统上,更新lean大佬的XXXPLUS的v2插件!$none" - #curl -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep "tag_name" | cut -d\" -f4 - v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" && sleep 2 - v2ray_ver="v`/usr/bin/v2ray/v2ray -version | grep "V2" | awk '{print $2}'`" &> /dev/null - #v2ray_ver="v$(/usr/bin/v2ray/v2ray -version | grep "V2" | awk '{print $2}')" &> /dev/null - if [ "$v2ray_ver" != "$v2ray_latest_ver" ]; then - clear - echo - echo -e " $green 咦...发现新版本耶....正在拼命更新.......$none" - echo - v2ray_download_link="https://github.com/v2ray/v2ray-core/releases/download/$v2ray_latest_ver/v2ray-linux-64.zip" - echo - echo - wget "$v2ray_download_link" - unzip -o v2ray-linux-64.zip &> /dev/null - echo - else - clear - echo - echo -e " $green 木有发现新版本....$none" - echo - exit 0 - fi - if [ -e /tmp/tmp/v2ray ]; then - mv -f /tmp/tmp/v2ctl /usr/bin/v2ray - mv -f /tmp/tmp/v2ray /usr/bin/v2ray - chmod 755 /usr/bin/v2ray/v2ctl - chmod 755 /usr/bin/v2ray/v2ray - /etc/init.d/shadowsocksr restart - echo - echo -e " $green 更新成功啦...当前 V2Ray 版本: ${cyan}$v2ray_latest_ver$none" - echo - echo -e " $yellow 温馨提示: 为了避免出现莫名其妙的问题...V2Ray 客户端的版本最好和服务器的版本保持一致$none" - echo - echo - exit 0 - else - echo - echo -e " - $red 下载 V2Ray 失败啦..可能是你的 VPS 网络太辣鸡了...请重试...$none - " && exit 0 - fi From b4a6565505035e31f34d2553947a025f4af22ba0 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Fri, 17 Jan 2020 20:34:19 +0800 Subject: [PATCH 55/71] Update v2_update.sh --- v2_update.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/v2_update.sh b/v2_update.sh index 60a5e44..2590b87 100644 --- a/v2_update.sh +++ b/v2_update.sh @@ -66,7 +66,6 @@ elif [[ "$sr" = "/var/etc/v2-ssr-retcp.json" && -e /tmp/tmp/v2ray ]]; then exit 0 else echo - echo -e " - $red 下载 V2Ray 失败啦..可能是你的 VPS 网络太辣鸡了...请重试...$none - " && exit 0 + echo -e "$red 下载 V2Ray 失败啦..可能是你的 VPS 网络太辣鸡了...请重试...$none" + exit 0 fi From 557bc30ca7bbfd811da2a0f165bf4e705c6ff4f3 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Sat, 18 Jan 2020 15:00:37 +0800 Subject: [PATCH 56/71] Update v2_update.sh --- v2_update.sh | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/v2_update.sh b/v2_update.sh index 2590b87..90dde19 100644 --- a/v2_update.sh +++ b/v2_update.sh @@ -1,17 +1,17 @@ #!/bin/bash -#只能x86-64的openwrt系统上,能lean大佬的XXXPLUS和passwall的v2插件 +#只能在x86-64的openwrt系统上更lean大佬的XXXPLUS和passwall的v2插件! # bash -c "$(wget -O- https://git.io/JvTVT)" -#Version: v2.0.1 By Len yu. +#Version: v2.0.2 By Len yu. cd /tmp/tmp rm -rf * echo echo -e " $green Version: v2.0.1 By Len yu.$none" echo -echo -e " $green 只能x86-64的openwrt系统上,可更新lean大佬的XXXPLUS和passwall的v2插件!$none" +echo -e " $green 2.只能x86-64的openwrt系统上,可更新lean大佬的XXXPLUS和passwall的v2插件!$none" sleep 2 clear echo -echo -e " $green 正在获取网络v2ray最新版信息..$none" +echo -e " $green 1.正在获取网络v2ray最新版信息..$none" echo #judgment v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" @@ -37,7 +37,7 @@ else fi ##install st="`ps | grep "passwall" | awk '{print $8}'`" &> /dev/null -sr="$(ps -ef | grep "/var/etc/v2-ssr" | awk '{print $7}')" &> /dev/null +sr="`ps -ef | grep "ssr-retcp" | awk '{print $9}' | echo ${sr: 13:5}`" &> /dev/null if [[ "`echo ${st: 10:8}`" = "passwall" && -e /tmp/tmp/v2ray ]]; then mv -f /tmp/tmp/v2ctl /usr/bin/v2ray mv -f /tmp/tmp/v2ray /usr/bin/v2ray @@ -45,20 +45,20 @@ if [[ "`echo ${st: 10:8}`" = "passwall" && -e /tmp/tmp/v2ray ]]; then chmod 755 /usr/bin/v2ray/v2ray /etc/init.d/passwall restart echo - echo -e " $green 更新成功啦...当前 V2Ray 版本: ${cyan}$v2ray_latest_ver$none" + echo -e " $green 更新成功啦...当前 V2Ray 版本: ${cyan}$v2ray_latest_ver$none" echo - echo -e " $yellow 温馨提示: 为了避免出现莫名其妙的问题...V2Ray路由端的版本最好和服务器的版本保持一致$none" + echo -e " $yellow 温馨提示: 为了避免出现莫名其妙的问题..V2Ray路由端的版本最好和服务器的版本保持一致$none" echo echo exit 0 -elif [[ "$sr" = "/var/etc/v2-ssr-retcp.json" && -e /tmp/tmp/v2ray ]]; then +elif [[ "$sr" = "retcp" && -e /tmp/tmp/v2ray ]]; then mv -f /tmp/tmp/v2ctl /usr/bin/v2ray mv -f /tmp/tmp/v2ray /usr/bin/v2ray chmod 755 /usr/bin/v2ray/v2ctl chmod 755 /usr/bin/v2ray/v2ray /etc/init.d/shadowsocksr restart echo - echo -e " $green 更新成功啦...当前 V2Ray 版本: ${cyan}$v2ray_latest_ver$none" + echo -e " $green 更新成功啦...当前 V2Ray 版本: ${cyan}$v2ray_latest_ver$none" echo echo -e " $yellow 温馨提示: 为了避免出现莫名其妙的问题...V2Ray路由端的版本最好和服务器的版本保持一致$none" echo @@ -66,6 +66,7 @@ elif [[ "$sr" = "/var/etc/v2-ssr-retcp.json" && -e /tmp/tmp/v2ray ]]; then exit 0 else echo - echo -e "$red 下载 V2Ray 失败啦..可能是你的 VPS 网络太辣鸡了...请重试...$none" - exit 0 + echo -e "$red 下载 V2Ray 失败[需要连接科学]...请重试...$none" + exit 0 fi + From 17406e82135ace6cf185b4fa474314f105d4c21b Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Sat, 18 Jan 2020 15:01:51 +0800 Subject: [PATCH 57/71] Update v2_update.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.优化逻辑判断 2.适配性更强 --- v2_update.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/v2_update.sh b/v2_update.sh index 90dde19..02b01e3 100644 --- a/v2_update.sh +++ b/v2_update.sh @@ -5,13 +5,13 @@ cd /tmp/tmp rm -rf * echo -echo -e " $green Version: v2.0.1 By Len yu.$none" +echo -e " $green Version: v2.0.2 By Len yu.$none" echo -echo -e " $green 2.只能x86-64的openwrt系统上,可更新lean大佬的XXXPLUS和passwall的v2插件!$none" +echo -e " $green 只能x86-64的openwrt系统上,可更新lean大佬的XXXPLUS和passwall的v2插件!$none" sleep 2 clear echo -echo -e " $green 1.正在获取网络v2ray最新版信息..$none" +echo -e " $green 正在获取网络v2ray最新版信息..$none" echo #judgment v2ray_latest_ver="$(curl -H 'Cache-Control: no-cache' -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep 'tag_name' | cut -d\" -f4)" @@ -69,4 +69,3 @@ else echo -e "$red 下载 V2Ray 失败[需要连接科学]...请重试...$none" exit 0 fi - From cc8575c759e007133f83fecd1656f2c6b8e385d1 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Sat, 18 Jan 2020 15:03:54 +0800 Subject: [PATCH 58/71] Update v2_update.sh --- v2_update.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/v2_update.sh b/v2_update.sh index 02b01e3..0cead63 100644 --- a/v2_update.sh +++ b/v2_update.sh @@ -7,6 +7,8 @@ rm -rf * echo echo -e " $green Version: v2.0.2 By Len yu.$none" echo +clear +echo echo -e " $green 只能x86-64的openwrt系统上,可更新lean大佬的XXXPLUS和passwall的v2插件!$none" sleep 2 clear From ec54d329c92d5a6b602435fc9009be852549e92e Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Sat, 18 Jan 2020 15:04:47 +0800 Subject: [PATCH 59/71] Update v2_update.sh --- v2_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2_update.sh b/v2_update.sh index 0cead63..bd6132d 100644 --- a/v2_update.sh +++ b/v2_update.sh @@ -5,9 +5,9 @@ cd /tmp/tmp rm -rf * echo -echo -e " $green Version: v2.0.2 By Len yu.$none" echo clear +echo -e " $green Version: v2.0.2 By Len yu.$none" echo echo -e " $green 只能x86-64的openwrt系统上,可更新lean大佬的XXXPLUS和passwall的v2插件!$none" sleep 2 From 70d5e3a11346b77dcaecaea3447bfda0710935bd Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Sat, 18 Jan 2020 15:06:11 +0800 Subject: [PATCH 60/71] Update v2_update.sh --- v2_update.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/v2_update.sh b/v2_update.sh index bd6132d..95db080 100644 --- a/v2_update.sh +++ b/v2_update.sh @@ -5,8 +5,9 @@ cd /tmp/tmp rm -rf * echo -echo clear +echo +echo echo -e " $green Version: v2.0.2 By Len yu.$none" echo echo -e " $green 只能x86-64的openwrt系统上,可更新lean大佬的XXXPLUS和passwall的v2插件!$none" From 1a4b55b91b3d0948d5c00ea470b4c06835b1d44e Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Sat, 18 Jan 2020 15:08:34 +0800 Subject: [PATCH 61/71] Update v2_update.sh --- v2_update.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/v2_update.sh b/v2_update.sh index 95db080..c7107ea 100644 --- a/v2_update.sh +++ b/v2_update.sh @@ -48,7 +48,7 @@ if [[ "`echo ${st: 10:8}`" = "passwall" && -e /tmp/tmp/v2ray ]]; then chmod 755 /usr/bin/v2ray/v2ray /etc/init.d/passwall restart echo - echo -e " $green 更新成功啦...当前 V2Ray 版本: ${cyan}$v2ray_latest_ver$none" + echo -e " $green 更新成功啦...当前 V2Ray 版本: ${cyan}$v2ray_latest_ver$none" echo echo -e " $yellow 温馨提示: 为了避免出现莫名其妙的问题..V2Ray路由端的版本最好和服务器的版本保持一致$none" echo @@ -69,6 +69,6 @@ elif [[ "$sr" = "retcp" && -e /tmp/tmp/v2ray ]]; then exit 0 else echo - echo -e "$red 下载 V2Ray 失败[需要连接科学]...请重试...$none" - exit 0 + echo -e "$red 下载 V2Ray 失败[需要连接科学]...请重试...$none" + exit 0 fi From 5b9089e0fa55d575dd18935942bdd5b9b5c89c3c Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Sat, 18 Jan 2020 15:36:59 +0800 Subject: [PATCH 62/71] Update v2_update.sh --- v2_update.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/v2_update.sh b/v2_update.sh index c7107ea..682e713 100644 --- a/v2_update.sh +++ b/v2_update.sh @@ -70,5 +70,7 @@ elif [[ "$sr" = "retcp" && -e /tmp/tmp/v2ray ]]; then else echo echo -e "$red 下载 V2Ray 失败[需要连接科学]...请重试...$none" + echo + echo exit 0 fi From 0312a4ebcab42b00524cc59b1d3a87e6bbff186a Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Sat, 18 Jan 2020 15:38:02 +0800 Subject: [PATCH 63/71] Update v2_update.sh --- v2_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2_update.sh b/v2_update.sh index 682e713..dbcec66 100644 --- a/v2_update.sh +++ b/v2_update.sh @@ -61,7 +61,7 @@ elif [[ "$sr" = "retcp" && -e /tmp/tmp/v2ray ]]; then chmod 755 /usr/bin/v2ray/v2ray /etc/init.d/shadowsocksr restart echo - echo -e " $green 更新成功啦...当前 V2Ray 版本: ${cyan}$v2ray_latest_ver$none" + echo -e " $green 更新成功啦...当前 V2Ray 版本: ${cyan}$v2ray_latest_ver$none" echo echo -e " $yellow 温馨提示: 为了避免出现莫名其妙的问题...V2Ray路由端的版本最好和服务器的版本保持一致$none" echo From 20bfd59af90c37e9a8f987497f8770926ee0e3ac Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Sat, 18 Jan 2020 15:59:15 +0800 Subject: [PATCH 64/71] Update v2_update.sh --- v2_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2_update.sh b/v2_update.sh index dbcec66..a24c56e 100644 --- a/v2_update.sh +++ b/v2_update.sh @@ -39,7 +39,7 @@ else exit 0 fi ##install -st="`ps | grep "passwall" | awk '{print $8}'`" &> /dev/null +st="`ps | grep "passwall" | awk '{print $8}' | cut -d/ -f4`" &> /dev/null sr="`ps -ef | grep "ssr-retcp" | awk '{print $9}' | echo ${sr: 13:5}`" &> /dev/null if [[ "`echo ${st: 10:8}`" = "passwall" && -e /tmp/tmp/v2ray ]]; then mv -f /tmp/tmp/v2ctl /usr/bin/v2ray From eb4444bd43a735b9f4226f5f86223a4a7a993787 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Sat, 18 Jan 2020 16:03:04 +0800 Subject: [PATCH 65/71] Update v2_update.sh --- v2_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2_update.sh b/v2_update.sh index a24c56e..240d376 100644 --- a/v2_update.sh +++ b/v2_update.sh @@ -41,7 +41,7 @@ fi ##install st="`ps | grep "passwall" | awk '{print $8}' | cut -d/ -f4`" &> /dev/null sr="`ps -ef | grep "ssr-retcp" | awk '{print $9}' | echo ${sr: 13:5}`" &> /dev/null -if [[ "`echo ${st: 10:8}`" = "passwall" && -e /tmp/tmp/v2ray ]]; then +if [[ "$st" = "passwall" && -e /tmp/tmp/v2ray ]]; then mv -f /tmp/tmp/v2ctl /usr/bin/v2ray mv -f /tmp/tmp/v2ray /usr/bin/v2ray chmod 755 /usr/bin/v2ray/v2ctl From 36fa2aacb5bd530f164fa43cbe420edadef4941a Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Sat, 18 Jan 2020 16:05:43 +0800 Subject: [PATCH 66/71] Update v2_update.sh --- v2_update.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/v2_update.sh b/v2_update.sh index 240d376..ed0302e 100644 --- a/v2_update.sh +++ b/v2_update.sh @@ -41,6 +41,7 @@ fi ##install st="`ps | grep "passwall" | awk '{print $8}' | cut -d/ -f4`" &> /dev/null sr="`ps -ef | grep "ssr-retcp" | awk '{print $9}' | echo ${sr: 13:5}`" &> /dev/null +sleep 3 if [[ "$st" = "passwall" && -e /tmp/tmp/v2ray ]]; then mv -f /tmp/tmp/v2ctl /usr/bin/v2ray mv -f /tmp/tmp/v2ray /usr/bin/v2ray From be8a38b1aa63a8b1fc1f127077e7d1102915354e Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Sat, 18 Jan 2020 16:18:47 +0800 Subject: [PATCH 67/71] Update v2_update.sh --- v2_update.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/v2_update.sh b/v2_update.sh index ed0302e..240d376 100644 --- a/v2_update.sh +++ b/v2_update.sh @@ -41,7 +41,6 @@ fi ##install st="`ps | grep "passwall" | awk '{print $8}' | cut -d/ -f4`" &> /dev/null sr="`ps -ef | grep "ssr-retcp" | awk '{print $9}' | echo ${sr: 13:5}`" &> /dev/null -sleep 3 if [[ "$st" = "passwall" && -e /tmp/tmp/v2ray ]]; then mv -f /tmp/tmp/v2ctl /usr/bin/v2ray mv -f /tmp/tmp/v2ray /usr/bin/v2ray From 43b7682381dcba37c6ff696a66726c3f1a041a3b Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Sun, 17 Jan 2021 17:37:29 +0800 Subject: [PATCH 68/71] Create xray-update.sh --- xray-update.sh | 102 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 xray-update.sh diff --git a/xray-update.sh b/xray-update.sh new file mode 100644 index 0000000..144c77b --- /dev/null +++ b/xray-update.sh @@ -0,0 +1,102 @@ +#/usr/bin/bash +#获取当前绝对路径 +#echo "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" #/home/lenyu +cd /home/lenyu +echo +echo "准备获取最新的xray源码版本…" +echo +sh_new_ver=$(wget --no-check-certificate -qO- -t1 -T3 "https://github.com/XTLS/Xray-core/commits/main") +echo $sh_new_ver > 110.txt +sleep 2 +# 把文本内容格式化输出 +printf '%s\t %s\t %s\t %s\n' $(cat 110.txt) > 111 +#获得最新值1048列有待验证? +echo `sed '1048!d' /home/lenyu/111` >112 + +sleep 0.2 +#获得最新值 +new_ver=` cat 112 | cut -b 53-92` +echo $new_ver > new_ver + +#if条件判断old_ver文件是否存在,不存在创建 -f 判断文件 -d 判断文件夹 +if [ ! -f "old_ver" ]; then + clear + echo "old_ver被删除正在创建!" + sleep 0.1 + echo $new_ver > old_ver +fi +sleep 0.1 +old_ver=`cat old_ver` +if [ "$new_ver" = "$old_ver" ]; then + clear + echo "还没有最新的版本,请过段时间再试!" + echo "no_update" > /home/lenyu/noxray +else + clear + echo "发现更新,准备切换到最新的commit分支MD5" + echo "update" > /home/lenyu/noxray + sleep 1 + #替换最新的md5值 sed要使用""才会应用变量 + sed -i "s/.*PKG_SOURCE_VERSION:.*/PKG_SOURCE_VERSION:=$new_ver/" /home/lenyu/lede/package/lean/xray/Makefile +fi +echo +#检查固件是否更新 +cd /home/lenyu/lede +clear +echo "准备检查固件是否更新…" +s1=`git pull` +sleep 0.2 +s2=`git -C ~/lede/package/luci-app-openclash pull` +sleep 0.2 +if [[ "$s1" = "Already up to date." ]]; then + clear + echo "lede、ssr+或passwall源码没有更新…" + echo "no_update" > /home/lenyu/nolede +else +echo "update" > /home/lenyu/nolede +fi +echo +if [[ "$s2" = "Already up to date." ]]; then + clear + echo "luci-app-openclash源码没有更新…" + echo "no_update" > /home/lenyu/noopclash +else +echo "update" > /home/lenyu/noopclash +fi +echo +clear + sleep 0.1 + echo $new_ver > old_ver + sleep 0.1 + echo "#请检查脚本可用性,否则按任意键,开始编译固件…" +# read +nolede=`cat /home/lenyu/nolede` +noopclash=`cat /home/lenyu/noopclash` +noxray=`cat /home/lenyu/noxray` +sleep 0.2 +if [[("$nolede" = "update") || ("$noopclash" = "update") || ("$noxray" = "update")]]; then + clear + echo + echo "发现更新,请稍后…" + clear + echo + echo "准备开始编译最新固件…" + source /etc/environment && cd /home/lenyu/lede && git pull && git -C ~/lede/package/luci-app-openclash pull && ./scripts/feeds update -a && ./scripts/feeds install -a && make defconfig && make -j8 download && make -j10 V=s && bash rename.sh +fi +echo +if [[("$nolede" = "no_update") && ("$noopclash" = "no_update") && ("$noxray" = "no_update")]]; then + clear + echo + echo "呃呃…检查lede/ssr+/passwall/openclash源码,没有一个源码更新哟…还是稍安勿躁…" +fi +#脚本结束,准备最后的清理工作 +cd /home/lenyu +rm -rf /home/lenyu/noxray +rm -rf /home/lenyu/noopclash +rm -rf /home/lenyu/nolede +echo +echo "脚本退出!" +echo +sleep 1 +#clear +exit 0 From 7cb6e15f3ba7dfa38bd2be882971fa1f1a005ccd Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Tue, 19 Jan 2021 00:42:17 +0800 Subject: [PATCH 69/71] Update xray-update.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #version v1.1.1 #增加对ssr+更新的逻辑判断 --- xray-update.sh | 58 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 45 insertions(+), 13 deletions(-) diff --git a/xray-update.sh b/xray-update.sh index 144c77b..34a9a93 100644 --- a/xray-update.sh +++ b/xray-update.sh @@ -1,21 +1,22 @@ #/usr/bin/bash +#Author Lenyu +#version v1.1.1 #获取当前绝对路径 -#echo "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" #/home/lenyu +#echo "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd /home/lenyu echo echo "准备获取最新的xray源码版本…" echo sh_new_ver=$(wget --no-check-certificate -qO- -t1 -T3 "https://github.com/XTLS/Xray-core/commits/main") -echo $sh_new_ver > 110.txt +echo $sh_new_ver > 110 sleep 2 # 把文本内容格式化输出 -printf '%s\t %s\t %s\t %s\n' $(cat 110.txt) > 111 -#获得最新值1048列有待验证? -echo `sed '1048!d' /home/lenyu/111` >112 - +printf '%s\t %s\t %s\t %s\n' $(cat 110) > 111 +#获得最新值MD5值的那列 +grep "https://github.com/XTLS/Xray-core/commit/" 111 > 112 sleep 0.2 #获得最新值 -new_ver=` cat 112 | cut -b 53-92` +new_ver=` cat 112 | cut -b 52-91` echo $new_ver > new_ver #if条件判断old_ver文件是否存在,不存在创建 -f 判断文件 -d 判断文件夹 @@ -40,6 +41,34 @@ else sed -i "s/.*PKG_SOURCE_VERSION:.*/PKG_SOURCE_VERSION:=$new_ver/" /home/lenyu/lede/package/lean/xray/Makefile fi echo +###判断ssr+是否有更新-开始### +new_ssr=$(wget --no-check-certificate -qO- -t1 -T3 "https://github.com/fw876/helloworld/commits/master") +sleep 0.2 +echo $new_ssr > ssr1 +printf '%s\t %s\t %s\t %s\n' $(cat ssr1) > ssr2 +grep "https://github.com/fw876/helloworld/commits/master?after=" ssr2 > ssr3 +sleep 0.1 +#获得最新值 +new_ssr=` cat ssr3 | cut -b 64-103` +echo $new_ssr > new_ssr +#if条件判断old_ssr文件是否存在,不存在创建 -f 判断文件 -d 判断文件夹 +if [ ! -f "old_ssr" ]; then + clear + echo "old_ssr被删除正在创建!" + sleep 0.1 + echo $new_ssr > old_ssr +fi +sleep 0.1 +old_ssr=`cat old_ssr` +if [ "$new_ssr" = "$old_ssr" ]; then + echo "no_update" > /home/lenyu/nossr +else + echo "update" > /home/lenyu/nossr + echo $new_ssr > old_ssr +fi +echo +###判断ssr+是否有更新-结束### +echo #检查固件是否更新 cd /home/lenyu/lede clear @@ -65,16 +94,15 @@ echo "update" > /home/lenyu/noopclash fi echo clear - sleep 0.1 - echo $new_ver > old_ver sleep 0.1 echo "#请检查脚本可用性,否则按任意键,开始编译固件…" # read nolede=`cat /home/lenyu/nolede` noopclash=`cat /home/lenyu/noopclash` noxray=`cat /home/lenyu/noxray` +nossr=`cat /home/lenyu/nossr` sleep 0.2 -if [[("$nolede" = "update") || ("$noopclash" = "update") || ("$noxray" = "update")]]; then +if [[("$nolede" = "update") || ("$noopclash" = "update") || ("$noxray" = "update") || ("$nossr" = "update" )]]; then clear echo echo "发现更新,请稍后…" @@ -82,21 +110,25 @@ if [[("$nolede" = "update") || ("$noopclash" = "update") || ("$noxray" = "update echo echo "准备开始编译最新固件…" source /etc/environment && cd /home/lenyu/lede && git pull && git -C ~/lede/package/luci-app-openclash pull && ./scripts/feeds update -a && ./scripts/feeds install -a && make defconfig && make -j8 download && make -j10 V=s && bash rename.sh + echo + echo "固件编译成功,脚本退出!" + exit 0 fi echo -if [[("$nolede" = "no_update") && ("$noopclash" = "no_update") && ("$noxray" = "no_update")]]; then +if [[("$nolede" = "no_update") && ("$noopclash" = "no_update") && ("$noxray" = "no_update") && ("$nossr" = "no_update" )]]; then clear echo - echo "呃呃…检查lede/ssr+/passwall/openclash源码,没有一个源码更新哟…还是稍安勿躁…" + echo "呃呃…检查lede/ssr+/xray/passwall/openclash源码,没有一个源码更新哟…还是稍安勿躁…" fi #脚本结束,准备最后的清理工作 cd /home/lenyu +echo $new_ver > old_ver rm -rf /home/lenyu/noxray rm -rf /home/lenyu/noopclash rm -rf /home/lenyu/nolede +rm -rf /home/lenyu/nossr echo echo "脚本退出!" echo sleep 1 -#clear exit 0 From 201b85c5738ff50ba4653b638e947031b24ff501 Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Tue, 19 Jan 2021 15:46:44 +0800 Subject: [PATCH 70/71] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=88=B0version=20v1.1?= =?UTF-8?q?.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.修复一些逻辑bug问题; 2.更新到version v1.1.2 --- xray-update.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/xray-update.sh b/xray-update.sh index 34a9a93..de0db94 100644 --- a/xray-update.sh +++ b/xray-update.sh @@ -1,6 +1,6 @@ #/usr/bin/bash #Author Lenyu -#version v1.1.1 +#version v1.1.2 #获取当前绝对路径 #echo "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd /home/lenyu @@ -111,7 +111,13 @@ if [[("$nolede" = "update") || ("$noopclash" = "update") || ("$noxray" = "update echo "准备开始编译最新固件…" source /etc/environment && cd /home/lenyu/lede && git pull && git -C ~/lede/package/luci-app-openclash pull && ./scripts/feeds update -a && ./scripts/feeds install -a && make defconfig && make -j8 download && make -j10 V=s && bash rename.sh echo + echo $new_ver > /home/lenyu/old_ver + rm -rf /home/lenyu/noxray + rm -rf /home/lenyu/noopclash + rm -rf /home/lenyu/nolede + rm -rf /home/lenyu/nossr echo "固件编译成功,脚本退出!" + echo exit 0 fi echo @@ -121,8 +127,7 @@ if [[("$nolede" = "no_update") && ("$noopclash" = "no_update") && ("$noxray" = " echo "呃呃…检查lede/ssr+/xray/passwall/openclash源码,没有一个源码更新哟…还是稍安勿躁…" fi #脚本结束,准备最后的清理工作 -cd /home/lenyu -echo $new_ver > old_ver +echo $new_ver > /home/lenyu/old_ver rm -rf /home/lenyu/noxray rm -rf /home/lenyu/noopclash rm -rf /home/lenyu/nolede @@ -130,5 +135,4 @@ rm -rf /home/lenyu/nossr echo echo "脚本退出!" echo -sleep 1 exit 0 From a59fa0dcc04d8a1c33c083a5c3c7091fa3b42f0d Mon Sep 17 00:00:00 2001 From: Lenyu2020 <59961153+Lenyu2020@users.noreply.github.com> Date: Tue, 19 Jan 2021 23:33:33 +0800 Subject: [PATCH 71/71] Update xray-update.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.增加passwall更新与否判断; 2.逻辑细节优化; 3.提升版本至version v1.1.3。 --- xray-update.sh | 42 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/xray-update.sh b/xray-update.sh index de0db94..ab1b2e3 100644 --- a/xray-update.sh +++ b/xray-update.sh @@ -1,6 +1,6 @@ #/usr/bin/bash #Author Lenyu -#version v1.1.2 +#version v1.1.3 #获取当前绝对路径 #echo "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd /home/lenyu @@ -69,6 +69,34 @@ fi echo ###判断ssr+是否有更新-结束### echo +###判断passwall是否有更新-开始### +new_passw=$(wget --no-check-certificate -qO- -t1 -T3 "https://github.com/xiaorouji/openwrt-passwall/commits/main") +sleep 0.2 +echo $new_passw > passw1 +printf '%s\t %s\t %s\t %s\n' $(cat passw1) > passw2 +grep "https://github.com/xiaorouji/openwrt-passwall/commit/" passw2 > passw3 +sleep 0.1 +#获得最新值 +new_passw=` cat passw3 | cut -b 70-109` +echo $new_passw > new_passw +#if条件判断old_ssr文件是否存在,不存在创建 -f 判断文件 -d 判断文件夹 +if [ ! -f "old_passw" ]; then + clear + echo "old_passw被删除正在创建!" + sleep 0.1 + echo $new_passw > old_passw +fi +sleep 0.1 +old_passw=`cat old_passw` +if [ "$new_passw" = "$old_passw" ]; then + echo "no_update" > /home/lenyu/nopassw +else + echo "update" > /home/lenyu/nopassw + echo $new_passw > old_passw +fi +echo +###判断passwall是否有更新-结束### +echo #检查固件是否更新 cd /home/lenyu/lede clear @@ -94,15 +122,15 @@ echo "update" > /home/lenyu/noopclash fi echo clear - sleep 0.1 - echo "#请检查脚本可用性,否则按任意键,开始编译固件…" -# read +sleep 0.1 +#总结判断之 nolede=`cat /home/lenyu/nolede` noopclash=`cat /home/lenyu/noopclash` noxray=`cat /home/lenyu/noxray` nossr=`cat /home/lenyu/nossr` +nopassw=`cat /home/lenyu/nopassw` sleep 0.2 -if [[("$nolede" = "update") || ("$noopclash" = "update") || ("$noxray" = "update") || ("$nossr" = "update" )]]; then +if [[("$nolede" = "update") || ("$noopclash" = "update") || ("$noxray" = "update") || ("$nossr" = "update" ) || ("$nopassw" = "update" )]]; then clear echo echo "发现更新,请稍后…" @@ -116,12 +144,13 @@ if [[("$nolede" = "update") || ("$noopclash" = "update") || ("$noxray" = "update rm -rf /home/lenyu/noopclash rm -rf /home/lenyu/nolede rm -rf /home/lenyu/nossr + rm -rf /home/lenyu/nopassw echo "固件编译成功,脚本退出!" echo exit 0 fi echo -if [[("$nolede" = "no_update") && ("$noopclash" = "no_update") && ("$noxray" = "no_update") && ("$nossr" = "no_update" )]]; then +if [[("$nolede" = "no_update") && ("$noopclash" = "no_update") && ("$noxray" = "no_update") && ("$nossr" = "no_update" ) && ("$nopassw" = "no_update" )]]; then clear echo echo "呃呃…检查lede/ssr+/xray/passwall/openclash源码,没有一个源码更新哟…还是稍安勿躁…" @@ -132,6 +161,7 @@ rm -rf /home/lenyu/noxray rm -rf /home/lenyu/noopclash rm -rf /home/lenyu/nolede rm -rf /home/lenyu/nossr +rm -rf /home/lenyu/nopassw echo echo "脚本退出!" echo