From 5092f76501f0c803b47bb0c9243d232e329b894e Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+howie-wu@users.noreply.github.com> Date: Fri, 27 May 2022 18:02:51 +0800 Subject: [PATCH 01/55] Update autoinstall.sh --- autoinstall.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstall.sh b/autoinstall.sh index 1a5b017..d86c88f 100644 --- a/autoinstall.sh +++ b/autoinstall.sh @@ -19,7 +19,7 @@ fi echo "Auto install start ..." opkg update opkg install curl -wget --no-check-certificate https://raw.githubusercontent.com/EndangeredF1sh/UPCNet/bash/UPCNet.sh && chmod +x UPCNet.sh +wget --no-check-certificate https://raw.githubusercontent.com/howie-wu/UPCNet/bash/UPCNet.sh && chmod +x UPCNet.sh echo -n "input stuID -> " read stuID echo -n "input password -> " From d69beff51eb9b5981f8458cee331bcd9a133232c Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+howie-wu@users.noreply.github.com> Date: Fri, 27 May 2022 18:13:11 +0800 Subject: [PATCH 02/55] Update UPCNet.sh Add Back --- UPCNet.sh | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/UPCNet.sh b/UPCNet.sh index 8378812..a62ee31 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -1,6 +1,12 @@ +back="" +flag="2" username="" password="" service="" + +usernameB="" +passwordB="" +serviceB="" DATE=`date +%Y-%m-%d-%H:%M:%S` tries=0 echo --- my_watchdog start --- @@ -17,8 +23,12 @@ done echo $DATE network restart >>my_watchdog.log /etc/init.d/network restart -sleep 10 +sleep 5 parameter='userId='${username}'&password='${password}'&service='${service}'&queryString=' +if [ $back == $flag ] +then +parameterB='userId='${username}'&password='${password}'&service='${service}'&queryString=' +fi location='http://121.251.251.207/eportal/InterFace.do?method=login' url=`curl -Ls -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" -o /dev/null -w %{url_effective} http://121.251.251.217` url=${url#*/eportal/index.jsp?} @@ -27,5 +37,15 @@ url=${url//&/%2526} url=${url//:/%253A} url=${url//\//%252F} parameter=${parameter}${url}'&operatorPwd=&operatorUserId=&validcode=&passwordEncrypt=false' +if [ $back == $flag ] +then +parameterB=${parameterB}${url}'&operatorPwd=&operatorUserId=&validcode=&passwordEncrypt=false' +echo $parameterB +fi + echo $parameter curl -X POST -d $parameter $location +if [ $back == $flag ] +then +curl -X POST -d $parameterB $location +fi From ac7f9cf48d8818bbb69af20068bbd8ba3b7ec4cc Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+howie-wu@users.noreply.github.com> Date: Fri, 27 May 2022 18:19:17 +0800 Subject: [PATCH 03/55] Update autoinstall.sh updata Backup --- autoinstall.sh | 50 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/autoinstall.sh b/autoinstall.sh index d86c88f..b59f65f 100644 --- a/autoinstall.sh +++ b/autoinstall.sh @@ -20,6 +20,8 @@ echo "Auto install start ..." opkg update opkg install curl wget --no-check-certificate https://raw.githubusercontent.com/howie-wu/UPCNet/bash/UPCNet.sh && chmod +x UPCNet.sh +echo -n "If Backup (1 for no,2 for yes) -> " +read bk echo -n "input stuID -> " read stuID echo -n "input password -> " @@ -56,14 +58,56 @@ read -p "Enter selection [1-5] -> " num if [[ $num == 5 ]]; then service="local" fi +if [ $bk == 2 ] +then +echo -n "input stuID -> " +read stuIDB +echo -n "input password -> " +read passwdB +echo "Select your back service: +1. Campus Network Service +2. China Unicom Network Service +3. China Mobile Network Service +4. China Telecom Network Service +5. Campus Intranet +" +read -p "Enter selection [1-5] -> " num + if [ $num -lt 1 ] || [ $num -gt 5 ];then + echo "invalid selection, exit."; + exit; + fi + + if [[ $num == 1 ]]; then + serviceB="default" + fi + + if [[ $num == 2 ]]; then + serviceB="unicom" + fi + + if [[ $num == 3 ]]; then + serviceB="cmcc" + fi + + if [[ $num == 4 ]]; then + serviceB="ctcc" + fi - + if [[ $num == 5 ]]; then + serviceB="local" + fi +fi sed -i '1,3d' UPCNet.sh +sed -i "1i back=\"$bk\"" UPCNet.sh sed -i "1i service=\"$service\"" UPCNet.sh sed -i "1i password=\"$passwd\"" UPCNet.sh sed -i "1i username=\"$stuID\"" UPCNet.sh - - +if [ $bk == 2 ] +then +sed -i "1i serviceB=\"$service\"" UPCNet.sh +sed -i "1i passwordB=\"$passwdB\"" UPCNet.sh +sed -i "1i usernameB=\"$stuIDB\"" UPCNet.sh +fi croncmd="sh ${SHELL_FOLDER}"/UPCNet.sh"" cronjob="*/1 * * * * $croncmd" ( crontab -l | grep -v -F "$croncmd" ; echo "$cronjob" ) | crontab - From 7741ff2c158010eed216064ecccc3b38fbc37f43 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+howie-wu@users.noreply.github.com> Date: Fri, 27 May 2022 18:20:14 +0800 Subject: [PATCH 04/55] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 17715b3..ebf3cf8 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ### Openwrt路由器自动安装 在命令行中使用root权限运行以下代码即可 ```` -wget --no-check-certificate https://raw.githubusercontent.com/EndangeredF1sh/UPCNet/bash/autoinstall.sh && chmod +x autoinstall.sh && sh autoinstall.sh +wget --no-check-certificate https://raw.githubusercontent.com/howie-wu/UPCNet/bash/autoinstall.sh && chmod +x autoinstall.sh && sh autoinstall.sh ```` ### 手动安装方法(其他Linux发行版,暂不支持pandavan) From 4acbcb6407a3d57c41f16bc8f30bde4e2f7ff774 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+howie-wu@users.noreply.github.com> Date: Fri, 27 May 2022 18:32:23 +0800 Subject: [PATCH 05/55] Update autoinstall.sh --- autoinstall.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/autoinstall.sh b/autoinstall.sh index b59f65f..48009e4 100644 --- a/autoinstall.sh +++ b/autoinstall.sh @@ -97,16 +97,23 @@ read -p "Enter selection [1-5] -> " num serviceB="local" fi fi + +if [ $bk == 2 ] +then sed -i '1,3d' UPCNet.sh sed -i "1i back=\"$bk\"" UPCNet.sh sed -i "1i service=\"$service\"" UPCNet.sh sed -i "1i password=\"$passwd\"" UPCNet.sh sed -i "1i username=\"$stuID\"" UPCNet.sh -if [ $bk == 2 ] -then -sed -i "1i serviceB=\"$service\"" UPCNet.sh +sed -i "1i serviceB=\"$serviceB\"" UPCNet.sh sed -i "1i passwordB=\"$passwdB\"" UPCNet.sh sed -i "1i usernameB=\"$stuIDB\"" UPCNet.sh +else +sed -i '1,3d' UPCNet.sh +sed -i "1i back=\"$bk\"" UPCNet.sh +sed -i "1i service=\"$service\"" UPCNet.sh +sed -i "1i password=\"$passwd\"" UPCNet.sh +sed -i "1i username=\"$stuID\"" UPCNet.sh fi croncmd="sh ${SHELL_FOLDER}"/UPCNet.sh"" cronjob="*/1 * * * * $croncmd" From aa7f457d71b10b912547455799d1e208cf9f4aaf Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+howie-wu@users.noreply.github.com> Date: Fri, 27 May 2022 18:32:27 +0800 Subject: [PATCH 06/55] Update UPCNet.sh --- UPCNet.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/UPCNet.sh b/UPCNet.sh index a62ee31..66821fe 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -1,5 +1,5 @@ back="" -flag="2" + username="" password="" service="" @@ -25,7 +25,7 @@ echo $DATE network restart >>my_watchdog.log /etc/init.d/network restart sleep 5 parameter='userId='${username}'&password='${password}'&service='${service}'&queryString=' -if [ $back == $flag ] +if [ $back == 2 ] then parameterB='userId='${username}'&password='${password}'&service='${service}'&queryString=' fi @@ -37,7 +37,7 @@ url=${url//&/%2526} url=${url//:/%253A} url=${url//\//%252F} parameter=${parameter}${url}'&operatorPwd=&operatorUserId=&validcode=&passwordEncrypt=false' -if [ $back == $flag ] +if [ $back == 2 ] then parameterB=${parameterB}${url}'&operatorPwd=&operatorUserId=&validcode=&passwordEncrypt=false' echo $parameterB @@ -45,7 +45,7 @@ fi echo $parameter curl -X POST -d $parameter $location -if [ $back == $flag ] +if [ $back == 2 ] then curl -X POST -d $parameterB $location fi From f842918db9cbf74d815d21494dbceb1920b39c6f Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+howie-wu@users.noreply.github.com> Date: Fri, 27 May 2022 18:38:02 +0800 Subject: [PATCH 07/55] Update autoinstall.sh --- autoinstall.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoinstall.sh b/autoinstall.sh index 48009e4..fac3fec 100644 --- a/autoinstall.sh +++ b/autoinstall.sh @@ -100,7 +100,7 @@ fi if [ $bk == 2 ] then -sed -i '1,3d' UPCNet.sh +sed -i '1,7d' UPCNet.sh sed -i "1i back=\"$bk\"" UPCNet.sh sed -i "1i service=\"$service\"" UPCNet.sh sed -i "1i password=\"$passwd\"" UPCNet.sh @@ -109,7 +109,7 @@ sed -i "1i serviceB=\"$serviceB\"" UPCNet.sh sed -i "1i passwordB=\"$passwdB\"" UPCNet.sh sed -i "1i usernameB=\"$stuIDB\"" UPCNet.sh else -sed -i '1,3d' UPCNet.sh +sed -i '1,4d' UPCNet.sh sed -i "1i back=\"$bk\"" UPCNet.sh sed -i "1i service=\"$service\"" UPCNet.sh sed -i "1i password=\"$passwd\"" UPCNet.sh From f538179611fd0d06adce72a55474c3b7a743ce22 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+howie-wu@users.noreply.github.com> Date: Fri, 27 May 2022 18:48:28 +0800 Subject: [PATCH 08/55] Update UPCNet.sh --- UPCNet.sh | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/UPCNet.sh b/UPCNet.sh index 66821fe..a7b995a 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -1,12 +1,11 @@ back="" - username="" password="" service="" - usernameB="" passwordB="" serviceB="" + DATE=`date +%Y-%m-%d-%H:%M:%S` tries=0 echo --- my_watchdog start --- @@ -25,10 +24,6 @@ echo $DATE network restart >>my_watchdog.log /etc/init.d/network restart sleep 5 parameter='userId='${username}'&password='${password}'&service='${service}'&queryString=' -if [ $back == 2 ] -then -parameterB='userId='${username}'&password='${password}'&service='${service}'&queryString=' -fi location='http://121.251.251.207/eportal/InterFace.do?method=login' url=`curl -Ls -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" -o /dev/null -w %{url_effective} http://121.251.251.217` url=${url#*/eportal/index.jsp?} @@ -37,15 +32,13 @@ url=${url//&/%2526} url=${url//:/%253A} url=${url//\//%252F} parameter=${parameter}${url}'&operatorPwd=&operatorUserId=&validcode=&passwordEncrypt=false' -if [ $back == 2 ] -then -parameterB=${parameterB}${url}'&operatorPwd=&operatorUserId=&validcode=&passwordEncrypt=false' -echo $parameterB -fi - echo $parameter curl -X POST -d $parameter $location + if [ $back == 2 ] then +parameterB='userId='${usernameB}'&password='${passwordB}'&service='${serviceB}'&queryString=' +parameterB=${parameterB}${url}'&operatorPwd=&operatorUserId=&validcode=&passwordEncrypt=false' +echo $parameterB curl -X POST -d $parameterB $location fi From 086d9430650c2b7e989a9183522befd9791ee5c7 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+howie-wu@users.noreply.github.com> Date: Thu, 3 Nov 2022 16:31:21 +0800 Subject: [PATCH 09/55] Update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ebf3cf8..82c19ce 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,14 @@ ### Openwrt路由器自动安装 在命令行中使用root权限运行以下代码即可 +不自动安装curl +````shell +wget --no-check-certificate https://raw.githubusercontent.com/howie-wu/UPCNet/bash/autoinstall.sh && chmod +x autoinstall.sh && sh autoinstall.sh ```` +自动安装curl +````shell wget --no-check-certificate https://raw.githubusercontent.com/howie-wu/UPCNet/bash/autoinstall.sh && chmod +x autoinstall.sh && sh autoinstall.sh ```` - ### 手动安装方法(其他Linux发行版,暂不支持pandavan) 在UPCNet.sh文件下输入学号(username)、密码(password)和运营商编号(service),然后运行 ``` From 6046358ac725199ca8462156ef351f23d7481dd9 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+howie-wu@users.noreply.github.com> Date: Fri, 4 Nov 2022 19:05:11 +0800 Subject: [PATCH 10/55] Create autoinstallNoUpdate.sh --- autoinstallNoUpdate.sh | 123 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 autoinstallNoUpdate.sh diff --git a/autoinstallNoUpdate.sh b/autoinstallNoUpdate.sh new file mode 100644 index 0000000..6357183 --- /dev/null +++ b/autoinstallNoUpdate.sh @@ -0,0 +1,123 @@ +os_release_path="/etc/os-release" +openwrt_release_path="/etc/openwrt_release" +SHELL_FOLDER=$(dirname $(readlink -f "$0")) +if [ -f "$os_release_path" ];then + source /etc/os-release +else + if [ -f "$openwrt_release_path" ];then + ID="openwrt" + fi +fi + +if [[ $ID != "openwrt" ]];then + read -r -p "Mismatch Operation System Detected, Are you sure to install? [Y/n] " response + if [[ $response != "y" && $response != "Y" ]];then + exit 0 + fi +fi + +echo "Auto install start ..." +wget --no-check-certificate https://raw.githubusercontent.com/howie-wu/UPCNet/bash/UPCNet.sh && chmod +x UPCNet.sh +echo -n "If Backup (1 for no,2 for yes) -> " +read bk +echo -n "input stuID -> " +read stuID +echo -n "input password -> " +read passwd +echo "Select your service: +1. Campus Network Service +2. China Unicom Network Service +3. China Mobile Network Service +4. China Telecom Network Service +5. Campus Intranet +" +read -p "Enter selection [1-5] -> " num + if [ $num -lt 1 ] || [ $num -gt 5 ];then + echo "invalid selection, exit."; + exit; + fi + + if [[ $num == 1 ]]; then + service="default" + fi + + if [[ $num == 2 ]]; then + service="unicom" + fi + + if [[ $num == 3 ]]; then + service="cmcc" + fi + + if [[ $num == 4 ]]; then + service="ctcc" + fi + + if [[ $num == 5 ]]; then + service="local" + fi +if [ $bk == 2 ] +then +echo -n "input stuID -> " +read stuIDB +echo -n "input password -> " +read passwdB +echo "Select your back service: +1. Campus Network Service +2. China Unicom Network Service +3. China Mobile Network Service +4. China Telecom Network Service +5. Campus Intranet +" +read -p "Enter selection [1-5] -> " num + if [ $num -lt 1 ] || [ $num -gt 5 ];then + echo "invalid selection, exit."; + exit; + fi + + if [[ $num == 1 ]]; then + serviceB="default" + fi + + if [[ $num == 2 ]]; then + serviceB="unicom" + fi + + if [[ $num == 3 ]]; then + serviceB="cmcc" + fi + + if [[ $num == 4 ]]; then + serviceB="ctcc" + fi + + if [[ $num == 5 ]]; then + serviceB="local" + fi +fi + +if [ $bk == 2 ] +then +sed -i '1,7d' UPCNet.sh +sed -i "1i back=\"$bk\"" UPCNet.sh +sed -i "1i service=\"$service\"" UPCNet.sh +sed -i "1i password=\"$passwd\"" UPCNet.sh +sed -i "1i username=\"$stuID\"" UPCNet.sh +sed -i "1i serviceB=\"$serviceB\"" UPCNet.sh +sed -i "1i passwordB=\"$passwdB\"" UPCNet.sh +sed -i "1i usernameB=\"$stuIDB\"" UPCNet.sh +else +sed -i '1,4d' UPCNet.sh +sed -i "1i back=\"$bk\"" UPCNet.sh +sed -i "1i service=\"$service\"" UPCNet.sh +sed -i "1i password=\"$passwd\"" UPCNet.sh +sed -i "1i username=\"$stuID\"" UPCNet.sh +fi +croncmd="sh ${SHELL_FOLDER}"/UPCNet.sh"" +cronjob="*/1 * * * * $croncmd" +( crontab -l | grep -v -F "$croncmd" ; echo "$cronjob" ) | crontab - + +sed -i "2a ${croncmd}" /etc/rc.local + +echo "Auto Install Finished. Enjoy." +rm -- "$0" From f7246d8b21a06107c4cd0367f37c9f95bf1792a6 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+howie-wu@users.noreply.github.com> Date: Fri, 4 Nov 2022 19:05:44 +0800 Subject: [PATCH 11/55] Update README.md --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 82c19ce..84494b7 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,11 @@ ![飞天面条教保佑你的代码](https://cdn.rawgit.com/LunaGao/BlessYourCodeTag/master/tags/ramen.svg) -## 由于portal升级,queryString等参数发生变化,脚本暂时失效 - ### Openwrt路由器自动安装 在命令行中使用root权限运行以下代码即可 不自动安装curl ````shell -wget --no-check-certificate https://raw.githubusercontent.com/howie-wu/UPCNet/bash/autoinstall.sh && chmod +x autoinstall.sh && sh autoinstall.sh +wget --no-check-certificate https://raw.githubusercontent.com/howie-wu/UPCNet/bash/autoinstallNoUpdate.sh && chmod +x autoinstallNoUpdate.sh && sh autoinstallNoUpdate.sh ```` 自动安装curl ````shell From 2705b732a3dd554e0282cbe4bfa94ccdfc952127 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Fri, 17 Mar 2023 12:37:56 +0800 Subject: [PATCH 12/55] change ping --- UPCNet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPCNet.sh b/UPCNet.sh index a7b995a..fb5faf6 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -11,7 +11,7 @@ tries=0 echo --- my_watchdog start --- while [[ $tries -lt 3 ]] do - if /bin/ping -c 1 114.114.114.114 >/dev/null + if /bin/ping -c 1 223.5.5.5 >/dev/null then echo --- exit --- exit 0 From c2584460c4d3ee787a854b82e980661ac95d9050 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Wed, 19 Apr 2023 17:45:15 +0800 Subject: [PATCH 13/55] =?UTF-8?q?=E4=BD=A0=E8=A7=89=E5=BE=97=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E9=87=8D=E5=90=AF=E7=BD=91=E5=8D=A1=E5=90=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- UPCNet.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/UPCNet.sh b/UPCNet.sh index fb5faf6..e130260 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -21,8 +21,9 @@ do done echo $DATE network restart >>my_watchdog.log -/etc/init.d/network restart -sleep 5 +# /etc/init.d/network restart +# 重启网卡需要吗? +# sleep 5 parameter='userId='${username}'&password='${password}'&service='${service}'&queryString=' location='http://121.251.251.207/eportal/InterFace.do?method=login' url=`curl -Ls -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" -o /dev/null -w %{url_effective} http://121.251.251.217` From 119b8716bd9170c21dadff1535e91ff540cb9a42 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Tue, 6 Jun 2023 10:02:55 +0800 Subject: [PATCH 14/55] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 84494b7..f6e34eb 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ 在命令行中使用root权限运行以下代码即可 不自动安装curl ````shell -wget --no-check-certificate https://raw.githubusercontent.com/howie-wu/UPCNet/bash/autoinstallNoUpdate.sh && chmod +x autoinstallNoUpdate.sh && sh autoinstallNoUpdate.sh +wget --no-check-certificate https://raw.githubusercontent.com/how1ewu/UPCNet/bash/autoinstallNoUpdate.sh && chmod +x autoinstallNoUpdate.sh && sh autoinstallNoUpdate.sh ```` 自动安装curl ````shell -wget --no-check-certificate https://raw.githubusercontent.com/howie-wu/UPCNet/bash/autoinstall.sh && chmod +x autoinstall.sh && sh autoinstall.sh +wget --no-check-certificate https://raw.githubusercontent.com/how1ewu/UPCNet/bash/autoinstall.sh && chmod +x autoinstall.sh && sh autoinstall.sh ```` ### 手动安装方法(其他Linux发行版,暂不支持pandavan) 在UPCNet.sh文件下输入学号(username)、密码(password)和运营商编号(service),然后运行 From 922ad0fa563a5e5490303f30faae350173c02ee7 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Tue, 6 Jun 2023 10:15:40 +0800 Subject: [PATCH 15/55] Update UPCNet.sh update more ping url --- UPCNet.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/UPCNet.sh b/UPCNet.sh index e130260..1cc5021 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -11,16 +11,20 @@ tries=0 echo --- my_watchdog start --- while [[ $tries -lt 3 ]] do - if /bin/ping -c 1 223.5.5.5 >/dev/null + ip_list=("223.5.5.5" "8.8.8.8" "119.29.29.29" "baidu.com") + for ip in "${ip_list[@]}" + do + if /bin/ping -c 1 "$ip" >/dev/null then - echo --- exit --- + echo "--- exit ---" exit 0 fi + done tries=$((tries+1)) sleep 1 done -echo $DATE network restart >>my_watchdog.log +echo $DATE network offline and try to restart... ... >>my_watchdog.log # /etc/init.d/network restart # 重启网卡需要吗? # sleep 5 From 48bdc5bff3f279c59249e2120cecf3fe3b7e1ba5 Mon Sep 17 00:00:00 2001 From: howie_wu Date: Tue, 6 Jun 2023 10:29:19 +0800 Subject: [PATCH 16/55] update ping url list --- UPCNet.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/UPCNet.sh b/UPCNet.sh index 1cc5021..a52ef5e 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -11,8 +11,10 @@ tries=0 echo --- my_watchdog start --- while [[ $tries -lt 3 ]] do - ip_list=("223.5.5.5" "8.8.8.8" "119.29.29.29" "baidu.com") - for ip in "${ip_list[@]}" + ip_list="223.5.5.5,8.8.8.8,119.29.29.29,baidu.com" + # 将字符串转换为数组 + IFS=',' read -ra ips <<< "$ip_list" + for ip in "${ips[@]}" do if /bin/ping -c 1 "$ip" >/dev/null then From 51a7e67d60fa878d14d629f91eccbf6e23423905 Mon Sep 17 00:00:00 2001 From: howie_wu Date: Tue, 6 Jun 2023 10:47:15 +0800 Subject: [PATCH 17/55] update ping url list --- UPCNet.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/UPCNet.sh b/UPCNet.sh index a52ef5e..678abf4 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -12,16 +12,15 @@ echo --- my_watchdog start --- while [[ $tries -lt 3 ]] do ip_list="223.5.5.5,8.8.8.8,119.29.29.29,baidu.com" - # 将字符串转换为数组 - IFS=',' read -ra ips <<< "$ip_list" - for ip in "${ips[@]}" + ips=$(echo "$ip_list" | tr ',' ' ') + for ip in $ips do if /bin/ping -c 1 "$ip" >/dev/null - then - echo "--- exit ---" - exit 0 - fi - done + then + echo "--- exit ---" + exit 0 + fi +done tries=$((tries+1)) sleep 1 done From ed392449219277dee236666f60c5c4620d84afc4 Mon Sep 17 00:00:00 2001 From: howie_wu Date: Tue, 6 Jun 2023 10:49:23 +0800 Subject: [PATCH 18/55] update ping url list --- UPCNet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPCNet.sh b/UPCNet.sh index 678abf4..a0f18ed 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -20,7 +20,7 @@ do echo "--- exit ---" exit 0 fi -done + done tries=$((tries+1)) sleep 1 done From 14b08e5391ed0cb64d68377337dbe48d7737d99f Mon Sep 17 00:00:00 2001 From: howie_wu Date: Tue, 6 Jun 2023 10:51:13 +0800 Subject: [PATCH 19/55] update ping url list --- UPCNet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPCNet.sh b/UPCNet.sh index a0f18ed..4bb45ab 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -11,7 +11,7 @@ tries=0 echo --- my_watchdog start --- while [[ $tries -lt 3 ]] do - ip_list="223.5.5.5,8.8.8.8,119.29.29.29,baidu.com" + ip_list="119.29.29.29,baidu.com,223.5.5.5,8.8.8.8" ips=$(echo "$ip_list" | tr ',' ' ') for ip in $ips do From 64b8bbb64243c21cbe81aba2ab02a65cb4106d85 Mon Sep 17 00:00:00 2001 From: howie_wu Date: Tue, 6 Jun 2023 10:53:30 +0800 Subject: [PATCH 20/55] update ping url list --- autoinstall.sh | 2 +- autoinstallNoUpdate.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/autoinstall.sh b/autoinstall.sh index fac3fec..5942600 100644 --- a/autoinstall.sh +++ b/autoinstall.sh @@ -19,7 +19,7 @@ fi echo "Auto install start ..." opkg update opkg install curl -wget --no-check-certificate https://raw.githubusercontent.com/howie-wu/UPCNet/bash/UPCNet.sh && chmod +x UPCNet.sh +wget --no-check-certificate https://raw.githubusercontent.com/how1ewu/UPCNet/bash/UPCNet.sh && chmod +x UPCNet.sh echo -n "If Backup (1 for no,2 for yes) -> " read bk echo -n "input stuID -> " diff --git a/autoinstallNoUpdate.sh b/autoinstallNoUpdate.sh index 6357183..2d3d227 100644 --- a/autoinstallNoUpdate.sh +++ b/autoinstallNoUpdate.sh @@ -17,7 +17,7 @@ if [[ $ID != "openwrt" ]];then fi echo "Auto install start ..." -wget --no-check-certificate https://raw.githubusercontent.com/howie-wu/UPCNet/bash/UPCNet.sh && chmod +x UPCNet.sh +wget --no-check-certificate https://raw.githubusercontent.com/how1ewu/UPCNet/bash/UPCNet.sh && chmod +x UPCNet.sh echo -n "If Backup (1 for no,2 for yes) -> " read bk echo -n "input stuID -> " From 4f781575e9119bb38b94f36b4461a21df78234f2 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Sat, 22 Jul 2023 13:46:35 +0800 Subject: [PATCH 21/55] Update README.md --- README.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/README.md b/README.md index f6e34eb..db831ef 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,58 @@ wget --no-check-certificate https://raw.githubusercontent.com/how1ewu/UPCNet/bas ````shell wget --no-check-certificate https://raw.githubusercontent.com/how1ewu/UPCNet/bash/autoinstall.sh && chmod +x autoinstall.sh && sh autoinstall.sh ```` +### Openwrt路由器配置IPV6中继Relay +> 引用自[Yumao's Blog](https://www.yumao.name/read/openwrt-ipv6-bridge-or-nat6/) +LUCI界面中LAN接口设置: +``` +路由通告服务:中继 +DHCPv6服务:中继 +NDP代理:中继 +``` +检查/etc/config/dhcp文件中,lan的相关参数 +``` +config dhcp 'lan' + option ra "relay" + option dhcp "relay" + option ndp "relay" +``` +修改 /etc/config/dhcp文件中,wan的相关参数 +``` +config dhcp 'wan' + option interface 'wan' + option dhcpv6 'relay' + option ra 'relay' + option ndp 'relay' + option master '1' + +``` +添加计划任务 +```shell +* * * * * /root/ipv6-bridge.sh +``` +/root/ipv6-bridge.sh如下: +```shell +#!/bin/sh +if [ -n "`ip -6 route show default|grep from -m 1`" ];then + logger -t "IPV6" change default gateway without from source + DEFAULT=`ip -6 route show default|grep from -m 1` + #刪除默認路由 + ip -6 route del ${DEFAULT} + #添加無from source路由 + ip -6 route add `echo ${DEFAULT}|sed -e 's/from [^ ]* //'` + #添加子網内設備通過br-lan訪問 + ip -6 route add `echo ${DEFAULT}|grep from|awk '{printf $3}'` dev br-lan metric 128 +fi +#刪除之前自動添加的錯誤路由 +ip -6 route list|grep -v default|grep -v br-lan|grep static|while read -r s; do ip -6 route del $s; done +#可選:可以根據需求自定義SUBNETEX的值,UPC校园网为240c +SUBNETEX="240c:" +ip -6 route list|grep -v default|grep -v br-lan|grep ${SUBNETEX}|while read -r s; do ip -6 route del $s; done + +``` +```shell +chmod +x /root/ipv6-bridge.sh +``` ### 手动安装方法(其他Linux发行版,暂不支持pandavan) 在UPCNet.sh文件下输入学号(username)、密码(password)和运营商编号(service),然后运行 ``` From e8db2e267ff1c33cbc0a5efb888ef2bdcf022da3 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Sat, 22 Jul 2023 13:46:57 +0800 Subject: [PATCH 22/55] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index db831ef..0ed82b6 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ wget --no-check-certificate https://raw.githubusercontent.com/how1ewu/UPCNet/bas ```` ### Openwrt路由器配置IPV6中继Relay > 引用自[Yumao's Blog](https://www.yumao.name/read/openwrt-ipv6-bridge-or-nat6/) + LUCI界面中LAN接口设置: ``` 路由通告服务:中继 From 4d294453b1f60d7048118e9a126768c8301e0024 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Mon, 14 Aug 2023 19:03:51 +0800 Subject: [PATCH 23/55] Update UPCNet.sh --- UPCNet.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/UPCNet.sh b/UPCNet.sh index 4bb45ab..dabe058 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -43,6 +43,20 @@ curl -X POST -d $parameter $location if [ $back == 2 ] then +do + ip_list="119.29.29.29,baidu.com,223.5.5.5,8.8.8.8" + ips=$(echo "$ip_list" | tr ',' ' ') + for ip in $ips + do + if /bin/ping -c 1 "$ip" >/dev/null + then + echo "--- exit ---" + exit 0 + fi + done + tries=$((tries+1)) + sleep 1 +done parameterB='userId='${usernameB}'&password='${passwordB}'&service='${serviceB}'&queryString=' parameterB=${parameterB}${url}'&operatorPwd=&operatorUserId=&validcode=&passwordEncrypt=false' echo $parameterB From f3599d27e9f584fe9db122557dd96f0a0c349e34 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Mon, 14 Aug 2023 19:14:11 +0800 Subject: [PATCH 24/55] Update UPCNet.sh --- UPCNet.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/UPCNet.sh b/UPCNet.sh index dabe058..8457d04 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -43,6 +43,7 @@ curl -X POST -d $parameter $location if [ $back == 2 ] then +while [[ $tries -lt 3 ]] do ip_list="119.29.29.29,baidu.com,223.5.5.5,8.8.8.8" ips=$(echo "$ip_list" | tr ',' ' ') From 87f2185ffce743bcfaa9ff5804eb52b668b3f9cb Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Wed, 16 Aug 2023 14:13:26 +0800 Subject: [PATCH 25/55] Update UPCNet.sh --- UPCNet.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/UPCNet.sh b/UPCNet.sh index 8457d04..c1b8376 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -9,7 +9,7 @@ serviceB="" DATE=`date +%Y-%m-%d-%H:%M:%S` tries=0 echo --- my_watchdog start --- -while [[ $tries -lt 3 ]] +while [[ $tries -lt 2 ]] do ip_list="119.29.29.29,baidu.com,223.5.5.5,8.8.8.8" ips=$(echo "$ip_list" | tr ',' ' ') @@ -28,7 +28,7 @@ done echo $DATE network offline and try to restart... ... >>my_watchdog.log # /etc/init.d/network restart # 重启网卡需要吗? -# sleep 5 +# sleep 3 parameter='userId='${username}'&password='${password}'&service='${service}'&queryString=' location='http://121.251.251.207/eportal/InterFace.do?method=login' url=`curl -Ls -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" -o /dev/null -w %{url_effective} http://121.251.251.217` @@ -40,10 +40,12 @@ url=${url//\//%252F} parameter=${parameter}${url}'&operatorPwd=&operatorUserId=&validcode=&passwordEncrypt=false' echo $parameter curl -X POST -d $parameter $location - +sleep 5 if [ $back == 2 ] then -while [[ $tries -lt 3 ]] +triesagain=0 + +while [[ $triesagain -lt 2 ]] do ip_list="119.29.29.29,baidu.com,223.5.5.5,8.8.8.8" ips=$(echo "$ip_list" | tr ',' ' ') From 638fc8c16f4f75b5732572118c4fd5cd84180c50 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Wed, 16 Aug 2023 14:21:15 +0800 Subject: [PATCH 26/55] Update UPCNet.sh --- UPCNet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPCNet.sh b/UPCNet.sh index c1b8376..347adf1 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -57,7 +57,7 @@ do exit 0 fi done - tries=$((tries+1)) + tries=$((triesagain+1)) sleep 1 done parameterB='userId='${usernameB}'&password='${passwordB}'&service='${serviceB}'&queryString=' From 4de4a1b9cee1dbba8381052ea79791e04f302104 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Fri, 18 Aug 2023 15:52:58 +0800 Subject: [PATCH 27/55] Update UPCNet.sh --- UPCNet.sh | 39 +++++++++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/UPCNet.sh b/UPCNet.sh index 347adf1..344eaf8 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -8,23 +8,25 @@ serviceB="" DATE=`date +%Y-%m-%d-%H:%M:%S` tries=0 -echo --- my_watchdog start --- +echo "Start detecting network connection status......" while [[ $tries -lt 2 ]] do - ip_list="119.29.29.29,baidu.com,223.5.5.5,8.8.8.8" + ip_list="119.29.29.29,223.5.5.5" ips=$(echo "$ip_list" | tr ',' ' ') for ip in $ips do if /bin/ping -c 1 "$ip" >/dev/null then - echo "--- exit ---" + echo "The network connection is normal, enjoy~" + echo "---close script---" exit 0 fi done tries=$((tries+1)) sleep 1 done - +echo "!!!ERROR: Network connection exception!!!" +echo "Start writing to the log and execute the login script..." echo $DATE network offline and try to restart... ... >>my_watchdog.log # /etc/init.d/network restart # 重启网卡需要吗? @@ -38,8 +40,9 @@ url=${url//&/%2526} url=${url//:/%253A} url=${url//\//%252F} parameter=${parameter}${url}'&operatorPwd=&operatorUserId=&validcode=&passwordEncrypt=false' -echo $parameter +# echo $parameter curl -X POST -d $parameter $location +echo "Try to log in using the primary account" sleep 5 if [ $back == 2 ] then @@ -47,21 +50,41 @@ triesagain=0 while [[ $triesagain -lt 2 ]] do - ip_list="119.29.29.29,baidu.com,223.5.5.5,8.8.8.8" + ip_list="119.29.29.29,223.5.5.5" ips=$(echo "$ip_list" | tr ',' ' ') for ip in $ips do if /bin/ping -c 1 "$ip" >/dev/null then - echo "--- exit ---" + echo "Log in with your primary account, the network is back to normal, enjoy~" + echo "---close script---" exit 0 fi done tries=$((triesagain+1)) sleep 1 done +echo "FAILED, Start trying to log in with an alternate account" parameterB='userId='${usernameB}'&password='${passwordB}'&service='${serviceB}'&queryString=' parameterB=${parameterB}${url}'&operatorPwd=&operatorUserId=&validcode=&passwordEncrypt=false' -echo $parameterB +# echo $parameterB curl -X POST -d $parameterB $location +triesagain2=0 +while [[ $triesagain2 -lt 2 ]] +do + ip_list="119.29.29.29,223.5.5.5" + ips=$(echo "$ip_list" | tr ',' ' ') + for ip in $ips + do + if /bin/ping -c 1 "$ip" >/dev/null + then + echo "Log in with your alternate account, the network is back to normal, enjoy~" + echo "---close script---" + exit 0 + fi + done + tries=$((triesagain2+1)) + sleep 1 +done +echo "You can't sign in with your existing account. Please check your configuration and other network settings and close script" fi From 9a2c928cb0b69e35185733097fa6745b0b3bfe49 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Sun, 17 Sep 2023 11:01:10 +0800 Subject: [PATCH 28/55] Update UPCNet.sh --- UPCNet.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/UPCNet.sh b/UPCNet.sh index 344eaf8..f141413 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -41,9 +41,9 @@ url=${url//:/%253A} url=${url//\//%252F} parameter=${parameter}${url}'&operatorPwd=&operatorUserId=&validcode=&passwordEncrypt=false' # echo $parameter +echo -e "Try to log in using the primary account\n" curl -X POST -d $parameter $location -echo "Try to log in using the primary account" -sleep 5 +sleep 3 if [ $back == 2 ] then triesagain=0 @@ -56,6 +56,7 @@ do do if /bin/ping -c 1 "$ip" >/dev/null then + echo -e "\n" echo "Log in with your primary account, the network is back to normal, enjoy~" echo "---close script---" exit 0 @@ -64,7 +65,7 @@ do tries=$((triesagain+1)) sleep 1 done -echo "FAILED, Start trying to log in with an alternate account" +echo -e "FAILED, Start trying to log in with an alternate account\n" parameterB='userId='${usernameB}'&password='${passwordB}'&service='${serviceB}'&queryString=' parameterB=${parameterB}${url}'&operatorPwd=&operatorUserId=&validcode=&passwordEncrypt=false' # echo $parameterB @@ -78,6 +79,7 @@ do do if /bin/ping -c 1 "$ip" >/dev/null then + echo -e "\n" echo "Log in with your alternate account, the network is back to normal, enjoy~" echo "---close script---" exit 0 From 93686ffc3829287cf33eee6b4511bb37692a0afb Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Sun, 17 Sep 2023 11:38:53 +0800 Subject: [PATCH 29/55] Update UPCNet.sh --- UPCNet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPCNet.sh b/UPCNet.sh index f141413..b45c5bd 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -43,7 +43,7 @@ parameter=${parameter}${url}'&operatorPwd=&operatorUserId=&validcode=&passwordEn # echo $parameter echo -e "Try to log in using the primary account\n" curl -X POST -d $parameter $location -sleep 3 +sleep 8 if [ $back == 2 ] then triesagain=0 From 78927538eae09858fbc362af9f96bae85f0c2ebf Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Tue, 12 Dec 2023 20:20:59 +0800 Subject: [PATCH 30/55] Update UPCNet.sh --- UPCNet.sh | 82 ++++++++++++++++++++++++------------------------------- 1 file changed, 35 insertions(+), 47 deletions(-) diff --git a/UPCNet.sh b/UPCNet.sh index b45c5bd..3b9d693 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -7,24 +7,19 @@ passwordB="" serviceB="" DATE=`date +%Y-%m-%d-%H:%M:%S` -tries=0 echo "Start detecting network connection status......" -while [[ $tries -lt 2 ]] +ip_list="119.29.29.29,223.5.5.5" +ips=$(echo "$ip_list" | tr ',' ' ') +for ip in $ips do - ip_list="119.29.29.29,223.5.5.5" - ips=$(echo "$ip_list" | tr ',' ' ') - for ip in $ips - do - if /bin/ping -c 1 "$ip" >/dev/null - then - echo "The network connection is normal, enjoy~" - echo "---close script---" - exit 0 - fi - done - tries=$((tries+1)) - sleep 1 + if /bin/ping -c 1 "$ip" >/dev/null + then + echo "The network connection is normal, enjoy~" + echo "---close script---" + exit 0 + fi done +sleep 1 echo "!!!ERROR: Network connection exception!!!" echo "Start writing to the log and execute the login script..." echo $DATE network offline and try to restart... ... >>my_watchdog.log @@ -46,47 +41,40 @@ curl -X POST -d $parameter $location sleep 8 if [ $back == 2 ] then -triesagain=0 - -while [[ $triesagain -lt 2 ]] +ip_list="119.29.29.29,223.5.5.5" +ips=$(echo "$ip_list" | tr ',' ' ') +for ip in $ips do - ip_list="119.29.29.29,223.5.5.5" - ips=$(echo "$ip_list" | tr ',' ' ') - for ip in $ips - do - if /bin/ping -c 1 "$ip" >/dev/null - then - echo -e "\n" - echo "Log in with your primary account, the network is back to normal, enjoy~" - echo "---close script---" - exit 0 - fi - done - tries=$((triesagain+1)) - sleep 1 + if /bin/ping -c 1 "$ip" >/dev/null + then + echo -e "\n" + echo "Log in with your primary account, the network is back to normal, enjoy~" + echo "---close script---" + reboot + exit 0 + fi +done +sleep 1 done echo -e "FAILED, Start trying to log in with an alternate account\n" parameterB='userId='${usernameB}'&password='${passwordB}'&service='${serviceB}'&queryString=' parameterB=${parameterB}${url}'&operatorPwd=&operatorUserId=&validcode=&passwordEncrypt=false' # echo $parameterB curl -X POST -d $parameterB $location -triesagain2=0 -while [[ $triesagain2 -lt 2 ]] +ip_list="119.29.29.29,223.5.5.5" +ips=$(echo "$ip_list" | tr ',' ' ') +for ip in $ips do - ip_list="119.29.29.29,223.5.5.5" - ips=$(echo "$ip_list" | tr ',' ' ') - for ip in $ips - do - if /bin/ping -c 1 "$ip" >/dev/null - then - echo -e "\n" - echo "Log in with your alternate account, the network is back to normal, enjoy~" - echo "---close script---" - exit 0 - fi + if /bin/ping -c 1 "$ip" >/dev/null + then + echo -e "\n" + echo "Log in with your alternate account, the network is back to normal, enjoy~" + echo "---close script---" + reboot + exit 0 + fi done - tries=$((triesagain2+1)) - sleep 1 +sleep 1 done echo "You can't sign in with your existing account. Please check your configuration and other network settings and close script" fi From eb476c27ef656f456b1c77e2b7ef81b1273dbc46 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Tue, 12 Dec 2023 20:40:40 +0800 Subject: [PATCH 31/55] Update UPCNet.sh --- UPCNet.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/UPCNet.sh b/UPCNet.sh index 3b9d693..100a078 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -51,11 +51,10 @@ do echo "Log in with your primary account, the network is back to normal, enjoy~" echo "---close script---" reboot + sleep 5 exit 0 fi done -sleep 1 -done echo -e "FAILED, Start trying to log in with an alternate account\n" parameterB='userId='${usernameB}'&password='${passwordB}'&service='${serviceB}'&queryString=' parameterB=${parameterB}${url}'&operatorPwd=&operatorUserId=&validcode=&passwordEncrypt=false' @@ -71,10 +70,9 @@ do echo "Log in with your alternate account, the network is back to normal, enjoy~" echo "---close script---" reboot + sleep 5 exit 0 fi - done -sleep 1 done echo "You can't sign in with your existing account. Please check your configuration and other network settings and close script" fi From 5b7b808ed6a566e182086733ede0d73cfde6fe01 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Tue, 12 Dec 2023 20:52:33 +0800 Subject: [PATCH 32/55] Update autoinstall.sh --- autoinstall.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/autoinstall.sh b/autoinstall.sh index 5942600..51ce696 100644 --- a/autoinstall.sh +++ b/autoinstall.sh @@ -20,7 +20,9 @@ echo "Auto install start ..." opkg update opkg install curl wget --no-check-certificate https://raw.githubusercontent.com/how1ewu/UPCNet/bash/UPCNet.sh && chmod +x UPCNet.sh -echo -n "If Backup (1 for no,2 for yes) -> " +echo -n "If you have openclash? (1 for no,2 for yes) -> " +read cat +echo -n "If Backup? (1 for no,2 for yes) -> " read bk echo -n "input stuID -> " read stuID @@ -101,6 +103,7 @@ fi if [ $bk == 2 ] then sed -i '1,7d' UPCNet.sh +sed -i "1i cat=\"$cat\"" UPCNet.sh sed -i "1i back=\"$bk\"" UPCNet.sh sed -i "1i service=\"$service\"" UPCNet.sh sed -i "1i password=\"$passwd\"" UPCNet.sh @@ -109,6 +112,7 @@ sed -i "1i serviceB=\"$serviceB\"" UPCNet.sh sed -i "1i passwordB=\"$passwdB\"" UPCNet.sh sed -i "1i usernameB=\"$stuIDB\"" UPCNet.sh else +sed -i "1i cat=\"$cat\"" UPCNet.sh sed -i '1,4d' UPCNet.sh sed -i "1i back=\"$bk\"" UPCNet.sh sed -i "1i service=\"$service\"" UPCNet.sh From f63d861f61431519347e481b3390a8b9fba143b0 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Tue, 12 Dec 2023 20:53:55 +0800 Subject: [PATCH 33/55] Update autoinstallNoUpdate.sh --- autoinstallNoUpdate.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/autoinstallNoUpdate.sh b/autoinstallNoUpdate.sh index 2d3d227..fcdd0b0 100644 --- a/autoinstallNoUpdate.sh +++ b/autoinstallNoUpdate.sh @@ -18,6 +18,8 @@ fi echo "Auto install start ..." wget --no-check-certificate https://raw.githubusercontent.com/how1ewu/UPCNet/bash/UPCNet.sh && chmod +x UPCNet.sh +echo -n "If you have openclash? (1 for no,2 for yes) -> " +read cat echo -n "If Backup (1 for no,2 for yes) -> " read bk echo -n "input stuID -> " @@ -98,7 +100,8 @@ fi if [ $bk == 2 ] then -sed -i '1,7d' UPCNet.sh +sed -i '1,8d' UPCNet.sh +sed -i "1i cat=\"$cat\"" UPCNet.sh sed -i "1i back=\"$bk\"" UPCNet.sh sed -i "1i service=\"$service\"" UPCNet.sh sed -i "1i password=\"$passwd\"" UPCNet.sh @@ -107,7 +110,8 @@ sed -i "1i serviceB=\"$serviceB\"" UPCNet.sh sed -i "1i passwordB=\"$passwdB\"" UPCNet.sh sed -i "1i usernameB=\"$stuIDB\"" UPCNet.sh else -sed -i '1,4d' UPCNet.sh +sed -i '1,5d' UPCNet.sh +sed -i "1i cat=\"$cat\"" UPCNet.sh sed -i "1i back=\"$bk\"" UPCNet.sh sed -i "1i service=\"$service\"" UPCNet.sh sed -i "1i password=\"$passwd\"" UPCNet.sh From d5f9f62765b60fb89bcccc819b349feb637f92ac Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Tue, 12 Dec 2023 20:54:17 +0800 Subject: [PATCH 34/55] Update autoinstall.sh --- autoinstall.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoinstall.sh b/autoinstall.sh index 51ce696..17f2569 100644 --- a/autoinstall.sh +++ b/autoinstall.sh @@ -102,7 +102,7 @@ fi if [ $bk == 2 ] then -sed -i '1,7d' UPCNet.sh +sed -i '1,8d' UPCNet.sh sed -i "1i cat=\"$cat\"" UPCNet.sh sed -i "1i back=\"$bk\"" UPCNet.sh sed -i "1i service=\"$service\"" UPCNet.sh @@ -112,8 +112,8 @@ sed -i "1i serviceB=\"$serviceB\"" UPCNet.sh sed -i "1i passwordB=\"$passwdB\"" UPCNet.sh sed -i "1i usernameB=\"$stuIDB\"" UPCNet.sh else +sed -i '1,5d' UPCNet.sh sed -i "1i cat=\"$cat\"" UPCNet.sh -sed -i '1,4d' UPCNet.sh sed -i "1i back=\"$bk\"" UPCNet.sh sed -i "1i service=\"$service\"" UPCNet.sh sed -i "1i password=\"$passwd\"" UPCNet.sh From ea716270868766547bc4dabd87d49e8e4548ddf7 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Tue, 12 Dec 2023 20:54:35 +0800 Subject: [PATCH 35/55] Update UPCNet.sh --- UPCNet.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/UPCNet.sh b/UPCNet.sh index 100a078..68b1d5f 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -1,3 +1,4 @@ +cat="" back="" username="" password="" From 2da432dd94c9e20854003fbdf53d284d0b63f979 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Tue, 12 Dec 2023 20:58:19 +0800 Subject: [PATCH 36/55] Update UPCNet.sh --- UPCNet.sh | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/UPCNet.sh b/UPCNet.sh index 68b1d5f..4b102da 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -27,6 +27,13 @@ echo $DATE network offline and try to restart... ... >>my_watchdog.log # /etc/init.d/network restart # 重启网卡需要吗? # sleep 3 +if [ $cat == 2 ] +then + uci set openclash.config.enable='0' + uci commit openclash + /etc/init.d/openclash stop + sleep 3 +done parameter='userId='${username}'&password='${password}'&service='${service}'&queryString=' location='http://121.251.251.207/eportal/InterFace.do?method=login' url=`curl -Ls -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" -o /dev/null -w %{url_effective} http://121.251.251.217` @@ -51,8 +58,13 @@ do echo -e "\n" echo "Log in with your primary account, the network is back to normal, enjoy~" echo "---close script---" - reboot - sleep 5 + if [ $cat == 2 ] + then + uci set openclash.config.enable='1' + uci commit openclash + /etc/init.d/openclash start + sleep 3 + done exit 0 fi done @@ -70,8 +82,13 @@ do echo -e "\n" echo "Log in with your alternate account, the network is back to normal, enjoy~" echo "---close script---" - reboot - sleep 5 + if [ $cat == 2 ] + then + uci set openclash.config.enable='1' + uci commit openclash + /etc/init.d/openclash start + sleep 3 + done exit 0 fi done From 2cf746ba8e1d11fbe018010bb990dae025c055ad Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Tue, 12 Dec 2023 21:01:42 +0800 Subject: [PATCH 37/55] Update UPCNet.sh --- UPCNet.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/UPCNet.sh b/UPCNet.sh index 4b102da..1065787 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -32,7 +32,7 @@ then uci set openclash.config.enable='0' uci commit openclash /etc/init.d/openclash stop - sleep 3 + sleep 10 done parameter='userId='${username}'&password='${password}'&service='${service}'&queryString=' location='http://121.251.251.207/eportal/InterFace.do?method=login' @@ -63,7 +63,7 @@ do uci set openclash.config.enable='1' uci commit openclash /etc/init.d/openclash start - sleep 3 + sleep 30 done exit 0 fi @@ -87,7 +87,7 @@ do uci set openclash.config.enable='1' uci commit openclash /etc/init.d/openclash start - sleep 3 + sleep 30 done exit 0 fi From 38353424413c528e9a2d5baab004b641e76c2399 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Tue, 12 Dec 2023 21:12:23 +0800 Subject: [PATCH 38/55] Update UPCNet.sh --- UPCNet.sh | 38 +++++++------------------------------- 1 file changed, 7 insertions(+), 31 deletions(-) diff --git a/UPCNet.sh b/UPCNet.sh index 1065787..ce0e631 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -1,28 +1,4 @@ cat="" -back="" -username="" -password="" -service="" -usernameB="" -passwordB="" -serviceB="" - -DATE=`date +%Y-%m-%d-%H:%M:%S` -echo "Start detecting network connection status......" -ip_list="119.29.29.29,223.5.5.5" -ips=$(echo "$ip_list" | tr ',' ' ') -for ip in $ips -do - if /bin/ping -c 1 "$ip" >/dev/null - then - echo "The network connection is normal, enjoy~" - echo "---close script---" - exit 0 - fi -done -sleep 1 -echo "!!!ERROR: Network connection exception!!!" -echo "Start writing to the log and execute the login script..." echo $DATE network offline and try to restart... ... >>my_watchdog.log # /etc/init.d/network restart # 重启网卡需要吗? @@ -33,7 +9,7 @@ then uci commit openclash /etc/init.d/openclash stop sleep 10 -done +fi parameter='userId='${username}'&password='${password}'&service='${service}'&queryString=' location='http://121.251.251.207/eportal/InterFace.do?method=login' url=`curl -Ls -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" -o /dev/null -w %{url_effective} http://121.251.251.217` @@ -63,9 +39,9 @@ do uci set openclash.config.enable='1' uci commit openclash /etc/init.d/openclash start - sleep 30 - done - exit 0 + sleep 40 + reboot + fi fi done echo -e "FAILED, Start trying to log in with an alternate account\n" @@ -87,9 +63,9 @@ do uci set openclash.config.enable='1' uci commit openclash /etc/init.d/openclash start - sleep 30 - done - exit 0 + sleep 40 + reboot + fi fi done echo "You can't sign in with your existing account. Please check your configuration and other network settings and close script" From f112f9db755e3a8e5b874c84dc4b37dcaaa96b50 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Tue, 12 Dec 2023 21:13:53 +0800 Subject: [PATCH 39/55] Update UPCNet.sh --- UPCNet.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/UPCNet.sh b/UPCNet.sh index ce0e631..cce9bcc 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -1,4 +1,13 @@ +usernameB="" +passwordB="" +serviceB="" +username="" +password="!" +service="" +back="" cat="" + + echo $DATE network offline and try to restart... ... >>my_watchdog.log # /etc/init.d/network restart # 重启网卡需要吗? From 03c84d53975777b5f2d49e8de5ec7437155c0aee Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Tue, 12 Dec 2023 21:23:09 +0800 Subject: [PATCH 40/55] Update UPCNet.sh --- UPCNet.sh | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/UPCNet.sh b/UPCNet.sh index cce9bcc..9cd4b4a 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -1,17 +1,33 @@ +cat="" +back="" +username="" +password="" +service="" usernameB="" passwordB="" serviceB="" -username="" -password="!" -service="" -back="" -cat="" - +DATE=`date +%Y-%m-%d-%H:%M:%S` +echo "Start detecting network connection status......" +ip_list="119.29.29.29,223.5.5.5" +ips=$(echo "$ip_list" | tr ',' ' ') +for ip in $ips +do + if /bin/ping -c 1 "$ip" >/dev/null + then + echo "The network connection is normal, enjoy~" + echo "---close script---" + exit 0 + fi +done +sleep 1 +echo "!!!ERROR: Network connection exception!!!" +echo "Start writing to the log and execute the login script..." echo $DATE network offline and try to restart... ... >>my_watchdog.log # /etc/init.d/network restart # 重启网卡需要吗? # sleep 3 + if [ $cat == 2 ] then uci set openclash.config.enable='0' From 8d2fe76fcc9f5b199e31fad7deb86096915501ac Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Tue, 12 Dec 2023 21:34:35 +0800 Subject: [PATCH 41/55] Update UPCNet.sh --- UPCNet.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/UPCNet.sh b/UPCNet.sh index 9cd4b4a..d9bac52 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -50,8 +50,6 @@ curl -X POST -d $parameter $location sleep 8 if [ $back == 2 ] then -ip_list="119.29.29.29,223.5.5.5" -ips=$(echo "$ip_list" | tr ',' ' ') for ip in $ips do if /bin/ping -c 1 "$ip" >/dev/null @@ -63,19 +61,24 @@ do then uci set openclash.config.enable='1' uci commit openclash - /etc/init.d/openclash start - sleep 40 reboot fi fi done +for ip in $ips +do + if /bin/ping -c 1 "$ip" >/dev/null + then + echo "The network connection is normal, enjoy~" + echo "---close script---" + exit 0 + fi +done echo -e "FAILED, Start trying to log in with an alternate account\n" parameterB='userId='${usernameB}'&password='${passwordB}'&service='${serviceB}'&queryString=' parameterB=${parameterB}${url}'&operatorPwd=&operatorUserId=&validcode=&passwordEncrypt=false' # echo $parameterB curl -X POST -d $parameterB $location -ip_list="119.29.29.29,223.5.5.5" -ips=$(echo "$ip_list" | tr ',' ' ') for ip in $ips do if /bin/ping -c 1 "$ip" >/dev/null @@ -87,8 +90,6 @@ do then uci set openclash.config.enable='1' uci commit openclash - /etc/init.d/openclash start - sleep 40 reboot fi fi From 981c4a7b660080c9de8aa0f31c7de24138e1907c Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Fri, 15 Dec 2023 13:32:24 +0800 Subject: [PATCH 42/55] Update UPCNet.sh --- UPCNet.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/UPCNet.sh b/UPCNet.sh index d9bac52..10bd946 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -63,6 +63,8 @@ do uci commit openclash reboot fi + sleep 15 + exit 0 fi done for ip in $ips @@ -92,6 +94,9 @@ do uci commit openclash reboot fi + sleep 15 + exit 0 + fi done echo "You can't sign in with your existing account. Please check your configuration and other network settings and close script" From 1a2449631b9dae07b27c6aefc98934496b218ef4 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Fri, 15 Dec 2023 13:42:15 +0800 Subject: [PATCH 43/55] Update autoinstall.sh --- autoinstall.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/autoinstall.sh b/autoinstall.sh index 17f2569..774674b 100644 --- a/autoinstall.sh +++ b/autoinstall.sh @@ -20,10 +20,12 @@ echo "Auto install start ..." opkg update opkg install curl wget --no-check-certificate https://raw.githubusercontent.com/how1ewu/UPCNet/bash/UPCNet.sh && chmod +x UPCNet.sh -echo -n "If you have openclash? (1 for no,2 for yes) -> " +echo -n "If you have openclash? (1 for no, 2 for yes, default:1) -> " read cat -echo -n "If Backup? (1 for no,2 for yes) -> " +cat=${cat:-1} +echo -n "If Backup? (1 for no,2 for yes, default:1) -> " read bk +bk=${bk:-1} echo -n "input stuID -> " read stuID echo -n "input password -> " From 08c7cb6bf2ef46d19a2539e5161984a50adfafa8 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Fri, 15 Dec 2023 13:42:50 +0800 Subject: [PATCH 44/55] Update autoinstallNoUpdate.sh --- autoinstallNoUpdate.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/autoinstallNoUpdate.sh b/autoinstallNoUpdate.sh index fcdd0b0..22fd730 100644 --- a/autoinstallNoUpdate.sh +++ b/autoinstallNoUpdate.sh @@ -18,10 +18,12 @@ fi echo "Auto install start ..." wget --no-check-certificate https://raw.githubusercontent.com/how1ewu/UPCNet/bash/UPCNet.sh && chmod +x UPCNet.sh -echo -n "If you have openclash? (1 for no,2 for yes) -> " +echo -n "If you have openclash? (1 for no, 2 for yes, default:1) -> " read cat -echo -n "If Backup (1 for no,2 for yes) -> " +cat=${cat:-1} +echo -n "If Backup? (1 for no,2 for yes, default:1) -> " read bk +bk=${bk:-1} echo -n "input stuID -> " read stuID echo -n "input password -> " From 47c84d725a1edf6a2a7372c1ee381d4752f8b0ca Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+how1ewu@users.noreply.github.com> Date: Sun, 17 Dec 2023 19:32:48 +0800 Subject: [PATCH 45/55] Update README.md From 2a829796dbf9e154f4c3840e6d11936a604773da Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+utopeadia@users.noreply.github.com> Date: Thu, 14 Mar 2024 22:00:59 +0800 Subject: [PATCH 46/55] Update UPCNet.sh --- UPCNet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPCNet.sh b/UPCNet.sh index 10bd946..da4fed3 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -9,7 +9,7 @@ serviceB="" DATE=`date +%Y-%m-%d-%H:%M:%S` echo "Start detecting network connection status......" -ip_list="119.29.29.29,223.5.5.5" +ip_list="39.156.66.10,119.29.29.29,223.5.5.5" ips=$(echo "$ip_list" | tr ',' ' ') for ip in $ips do From fc4d8b298f62e433f210591dc5aece28aa932201 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+utopeadia@users.noreply.github.com> Date: Sun, 5 May 2024 20:22:54 +0800 Subject: [PATCH 47/55] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0ed82b6..bac5ba5 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ 在命令行中使用root权限运行以下代码即可 不自动安装curl ````shell -wget --no-check-certificate https://raw.githubusercontent.com/how1ewu/UPCNet/bash/autoinstallNoUpdate.sh && chmod +x autoinstallNoUpdate.sh && sh autoinstallNoUpdate.sh +wget --no-check-certificate https://raw.githubusercontent.com/utopeadia/UPCNet/bash/autoinstallNoUpdate.sh && chmod +x autoinstallNoUpdate.sh && sh autoinstallNoUpdate.sh ```` 自动安装curl ````shell -wget --no-check-certificate https://raw.githubusercontent.com/how1ewu/UPCNet/bash/autoinstall.sh && chmod +x autoinstall.sh && sh autoinstall.sh +wget --no-check-certificate https://raw.githubusercontent.com/utopeadia/UPCNet/bash/autoinstall.sh && chmod +x autoinstall.sh && sh autoinstall.sh ```` ### Openwrt路由器配置IPV6中继Relay > 引用自[Yumao's Blog](https://www.yumao.name/read/openwrt-ipv6-bridge-or-nat6/) From f37dbfb63ad49680d18e71b814bd0056f30f65a8 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+utopeadia@users.noreply.github.com> Date: Sun, 5 May 2024 20:24:02 +0800 Subject: [PATCH 48/55] Update autoinstall.sh --- autoinstall.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstall.sh b/autoinstall.sh index 774674b..2183c14 100644 --- a/autoinstall.sh +++ b/autoinstall.sh @@ -19,7 +19,7 @@ fi echo "Auto install start ..." opkg update opkg install curl -wget --no-check-certificate https://raw.githubusercontent.com/how1ewu/UPCNet/bash/UPCNet.sh && chmod +x UPCNet.sh +wget --no-check-certificate https://raw.githubusercontent.com/utopeadia/UPCNet/bash/UPCNet.sh && chmod +x UPCNet.sh echo -n "If you have openclash? (1 for no, 2 for yes, default:1) -> " read cat cat=${cat:-1} From 81bb34fcd31f291927d1c283a9ceb6888c53e0b6 Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+utopeadia@users.noreply.github.com> Date: Sun, 5 May 2024 20:24:20 +0800 Subject: [PATCH 49/55] Update autoinstallNoUpdate.sh --- autoinstallNoUpdate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstallNoUpdate.sh b/autoinstallNoUpdate.sh index 22fd730..7f5f422 100644 --- a/autoinstallNoUpdate.sh +++ b/autoinstallNoUpdate.sh @@ -17,7 +17,7 @@ if [[ $ID != "openwrt" ]];then fi echo "Auto install start ..." -wget --no-check-certificate https://raw.githubusercontent.com/how1ewu/UPCNet/bash/UPCNet.sh && chmod +x UPCNet.sh +wget --no-check-certificate https://raw.githubusercontent.com/utopeadia/UPCNet/bash/UPCNet.sh && chmod +x UPCNet.sh echo -n "If you have openclash? (1 for no, 2 for yes, default:1) -> " read cat cat=${cat:-1} From d9e4ed278b1e9f755aea54ff96ac21c54fb5de3c Mon Sep 17 00:00:00 2001 From: HowieWu <98788152+utopeadia@users.noreply.github.com> Date: Sun, 5 May 2024 20:25:03 +0800 Subject: [PATCH 50/55] Update UPCNet.sh --- UPCNet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPCNet.sh b/UPCNet.sh index da4fed3..10bd946 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -9,7 +9,7 @@ serviceB="" DATE=`date +%Y-%m-%d-%H:%M:%S` echo "Start detecting network connection status......" -ip_list="39.156.66.10,119.29.29.29,223.5.5.5" +ip_list="119.29.29.29,223.5.5.5" ips=$(echo "$ip_list" | tr ',' ' ') for ip in $ips do From 1b4dd618caab654a134007448e423053e8694441 Mon Sep 17 00:00:00 2001 From: HowieWood <98788152+somnifex@users.noreply.github.com> Date: Fri, 4 Jul 2025 11:07:23 +0800 Subject: [PATCH 51/55] Update autoinstall.sh --- autoinstall.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstall.sh b/autoinstall.sh index 2183c14..071641f 100644 --- a/autoinstall.sh +++ b/autoinstall.sh @@ -19,7 +19,7 @@ fi echo "Auto install start ..." opkg update opkg install curl -wget --no-check-certificate https://raw.githubusercontent.com/utopeadia/UPCNet/bash/UPCNet.sh && chmod +x UPCNet.sh +wget --no-check-certificate https://raw.githubusercontent.com/somnifex/UPCNet/bash/UPCNet.sh && chmod +x UPCNet.sh echo -n "If you have openclash? (1 for no, 2 for yes, default:1) -> " read cat cat=${cat:-1} From 97fa2ff75cfe9ae4f2d1905ea3d7a95322fa7e32 Mon Sep 17 00:00:00 2001 From: HowieWood <98788152+somnifex@users.noreply.github.com> Date: Fri, 4 Jul 2025 11:07:40 +0800 Subject: [PATCH 52/55] Update autoinstallNoUpdate.sh --- autoinstallNoUpdate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstallNoUpdate.sh b/autoinstallNoUpdate.sh index 7f5f422..27551cb 100644 --- a/autoinstallNoUpdate.sh +++ b/autoinstallNoUpdate.sh @@ -17,7 +17,7 @@ if [[ $ID != "openwrt" ]];then fi echo "Auto install start ..." -wget --no-check-certificate https://raw.githubusercontent.com/utopeadia/UPCNet/bash/UPCNet.sh && chmod +x UPCNet.sh +wget --no-check-certificate https://raw.githubusercontent.com/somnifex/UPCNet/bash/UPCNet.sh && chmod +x UPCNet.sh echo -n "If you have openclash? (1 for no, 2 for yes, default:1) -> " read cat cat=${cat:-1} From 0d42f3432f7efa27e0c249a611869a86bd0ee00f Mon Sep 17 00:00:00 2001 From: HowieWood <98788152+somnifex@users.noreply.github.com> Date: Fri, 4 Jul 2025 11:08:06 +0800 Subject: [PATCH 53/55] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bac5ba5..b0ca46b 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ 在命令行中使用root权限运行以下代码即可 不自动安装curl ````shell -wget --no-check-certificate https://raw.githubusercontent.com/utopeadia/UPCNet/bash/autoinstallNoUpdate.sh && chmod +x autoinstallNoUpdate.sh && sh autoinstallNoUpdate.sh +wget --no-check-certificate https://raw.githubusercontent.com/somnifex/UPCNet/bash/autoinstallNoUpdate.sh && chmod +x autoinstallNoUpdate.sh && sh autoinstallNoUpdate.sh ```` 自动安装curl ````shell -wget --no-check-certificate https://raw.githubusercontent.com/utopeadia/UPCNet/bash/autoinstall.sh && chmod +x autoinstall.sh && sh autoinstall.sh +wget --no-check-certificate https://raw.githubusercontent.com/somnifex/UPCNet/bash/autoinstall.sh && chmod +x autoinstall.sh && sh autoinstall.sh ```` ### Openwrt路由器配置IPV6中继Relay > 引用自[Yumao's Blog](https://www.yumao.name/read/openwrt-ipv6-bridge-or-nat6/) From 6708c86afec8891407c6ef6af7c85306801073c6 Mon Sep 17 00:00:00 2001 From: HowieWood <98788152+somnifex@users.noreply.github.com> Date: Mon, 7 Jul 2025 11:10:42 +0800 Subject: [PATCH 54/55] Update UPCNet.sh --- UPCNet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPCNet.sh b/UPCNet.sh index 10bd946..673108e 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -9,7 +9,7 @@ serviceB="" DATE=`date +%Y-%m-%d-%H:%M:%S` echo "Start detecting network connection status......" -ip_list="119.29.29.29,223.5.5.5" +ip_list="47.104.38.82218.30.118.6,61.241.129.110" ips=$(echo "$ip_list" | tr ',' ' ') for ip in $ips do From f960401b6dd73622a3a41ae276d67b60c1aed861 Mon Sep 17 00:00:00 2001 From: HowieWood <98788152+somnifex@users.noreply.github.com> Date: Mon, 7 Jul 2025 11:11:57 +0800 Subject: [PATCH 55/55] Update UPCNet.sh --- UPCNet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPCNet.sh b/UPCNet.sh index 673108e..87b4d8d 100644 --- a/UPCNet.sh +++ b/UPCNet.sh @@ -9,7 +9,7 @@ serviceB="" DATE=`date +%Y-%m-%d-%H:%M:%S` echo "Start detecting network connection status......" -ip_list="47.104.38.82218.30.118.6,61.241.129.110" +ip_list="47.104.38.82,218.30.118.6,61.241.129.110" ips=$(echo "$ip_list" | tr ',' ' ') for ip in $ips do