diff --git a/bin/Country.mmdb b/bin/Country.mmdb index 3cf4554..e4e4444 100644 Binary files a/bin/Country.mmdb and b/bin/Country.mmdb differ diff --git a/bin/clashfm.tar.gz b/bin/clashfm.tar.gz index 959763c..dc2391f 100644 Binary files a/bin/clashfm.tar.gz and b/bin/clashfm.tar.gz differ diff --git a/bin/version b/bin/version index 65a39ee..2304ec7 100644 --- a/bin/version +++ b/bin/version @@ -1,2 +1,2 @@ -GeoIP_v=20200824 -versionsh=0.9.10 +GeoIP_v=20200827 +versionsh=1.0.0beta1 diff --git a/install.sh b/install.sh index 68efc5a..25264dd 100644 --- a/install.sh +++ b/install.sh @@ -7,16 +7,15 @@ echo "** Clash for Miwifi **" echo "** by Juewuy **" echo "***********************************************" -url="https://juewuy.xyz/clash/" +url="https://cdn.jsdelivr.net/gh/juewuy/clash-for-Miwifi@latest" result=$(curl -w %{http_code} -skLo /tmp/clashversion $url/bin/version) [ "$result" != "200" ] && echo "无法连接到服务器!" && exit 1 source /tmp/clashversion -echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo -e "~~~~版本:\033[32m$versionsh\033[0m" echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo -e "\033[44m使用中如遇问题请加TG群反馈:\033[42;30m t.me/clashfm \033[0m" -echo -e "\033[37m目前仅支持小米AX系列3款路由器" -echo -e "\033[44m其余型号可到TG群报名参与测试\033[0m" +echo -e "\033[37m支持各种基于openwrt的路由器设备" +echo -e "\033[33m有限支持debian、centos等Linux系统\033[0m" echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo -e "\033[32m 1 在默认目录(/etc)安装Clash for Miwifi" echo -e "\033[33m 2 手动设置安装目录(不明勿用!)" @@ -81,6 +80,7 @@ rm -rf /tmp/clashfm.tar.gz #提示 echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo clash for Miwifi 已经安装成功! -echo -e "\033[33m直接输入\033[30;47m clash \033[0;33m命令即可管理!!!\033[0m" +echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +echo -e "\033[33m输入\033[30;47m clash \033[0;33m命令即可管理!!!\033[0m" echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/scripts/clash.sh b/scripts/clash.sh index 980d139..b0d7b47 100644 --- a/scripts/clash.sh +++ b/scripts/clash.sh @@ -3,17 +3,12 @@ getconfig(){ #服务器地址 -if [ -z "$update_url" ]; then - update_url=https://cdn.jsdelivr.net/gh/juewuy/clash-for-Miwifi@latest -fi +[ -z "$update_url" ] && update_url=https://cdn.jsdelivr.net/gh/juewuy/clash-for-Miwifi@latest #文件路径 -if [ -z "$clashdir" ];then -clashdir=$(dirname $(readlink -f "$0")) -echo "export clashdir=\"$clashdir\"" >> /etc/profile -fi +[ -z "$clashdir" ] && clashdir=$(dirname $(readlink -f "$0")) && echo "export clashdir=\"$clashdir\"" >> /etc/profile ccfg=$clashdir/mark yaml=$clashdir/config.yaml -#检查标识文件 +#检查/读取标识文件 if [ ! -f $ccfg ]; then echo mark文件不存在,正在创建! cat >$ccfg< /dev/null 2>&1; then echo -e "\033[31m连接超时!请重试或检查节点配置!\033[0m" fi clashsh + + elif [[ $num == 7 ]]; then + echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + for PID in $(ps|awk '{print $1}');do + [ -f "/proc/$PID/status" ] && vmrss=$(cat /proc/$PID/status|grep -w VmRSS|awk '{print $2}') + [ -n "$vmrss" ] && echo $vmrss $(cat /proc/$PID/status|grep -w Name|awk '{print $2}') + done + echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + exit; else echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo -e "\033[31m请输入正确的数字!\033[0m" diff --git a/scripts/getdate.sh b/scripts/getdate.sh index 5405e84..16ebd58 100644 --- a/scripts/getdate.sh +++ b/scripts/getdate.sh @@ -414,9 +414,9 @@ fi clashcore_n=$clashcore #获取设备处理器架构 cpucore=$(uname -ms | tr ' ' '_' | tr '[A-Z]' '[a-z]') +[ -n "$(echo $cpucore | grep -E "linux.*armv.*")" ] && cpucore="armv5" [ -n "$(echo $cpucore | grep -E "linux.*aarch64.*")" ] && cpucore="armv8" [ -n "$(echo $cpucore | grep -E "linux.*armv7.*")" ] && cpucore="armv7" -[ -n "$(echo $cpucore | grep -E "linux.*armv.*")" ] && cpucore="armv5" [ -n "$(echo $cpucore | grep -E "linux.*mips.*")" ] && cpucore="mipsle-softfloat" [ -n "$(echo $cpucore | grep -E "linux.*x86.*")" ] && cpucore="386" [ -n "$(echo $cpucore | grep -E "linux.*amd64.*")" ] && cpucore="386" diff --git a/scripts/start.sh b/scripts/start.sh index a27f8e1..4c699a3 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -83,7 +83,7 @@ mark_time(){ start_redir(){ #修改iptables规则使流量进入clash iptables -t nat -N clash - iptables -t nat -A clash -d 0.0.0.0/8 -j RETURN + #iptables -t nat -A clash -d 0.0.0.0/8 -j RETURN iptables -t nat -A clash -d 10.0.0.0/8 -j RETURN iptables -t nat -A clash -d 127.0.0.0/8 -j RETURN iptables -t nat -A clash -d 169.254.0.0/16 -j RETURN