diff --git a/bin/ShellClash.tar.gz b/bin/ShellClash.tar.gz index 10e1ef9..3c1ac68 100644 Binary files a/bin/ShellClash.tar.gz and b/bin/ShellClash.tar.gz differ diff --git a/bin/clashfm.tar.gz b/bin/clashfm.tar.gz index 872b011..291060e 100644 Binary files a/bin/clashfm.tar.gz and b/bin/clashfm.tar.gz differ diff --git a/bin/public.tar.gz b/bin/public.tar.gz index 8707794..d006e4f 100644 Binary files a/bin/public.tar.gz and b/bin/public.tar.gz differ diff --git a/bin/version b/bin/version index f9ec635..36894a5 100644 --- a/bin/version +++ b/bin/version @@ -2,5 +2,5 @@ clashnet_v=v1.7.6 clashpre_v=2022.11.25 clash_v=v1.7.1 meta_v=v1.15.0 -versionsh=1.7.10f GeoIP_v=20230805 +versionsh=1.7.10g diff --git a/install.sh b/install.sh index 8395053..0da160f 100644 --- a/install.sh +++ b/install.sh @@ -14,7 +14,7 @@ echo "** by Juewuy **" echo "***********************************************" #内置工具 dir_avail(){ - df $2 $1 |awk '{ for(i=1;i<=NF;i++){ if(NR==1){ arr[i]=$i; }else{ arr[i]=arr[i]" "$i; } } } END{ for(i=1;i<=NF;i++){ print arr[i]; } }' |grep Ava |awk '{print $2}' + df $2 $1 |awk '{ for(i=1;i<=NF;i++){ if(NR==1){ arr[i]=$i; }else{ arr[i]=arr[i]" "$i; } } } END{ for(i=1;i<=NF;i++){ print arr[i]; } }' |grep -E 'Ava|可用' |awk '{print $2}' } setconfig(){ configpath=$clashdir/mark diff --git a/public/servers.list b/public/servers.list index 3dd2fb3..7fae0cb 100644 --- a/public/servers.list +++ b/public/servers.list @@ -7,7 +7,7 @@ 202 ShellClash私人源1 https://gh.jwsc.eu.org/master 公测版 203 ShellClash私人源2 https://gh.shellclash.workers.dev/https://raw.githubusercontent.com/juewuy/ShellClash 公测版 204 Github源(须clash服务启用) https://raw.githubusercontent.com/juewuy/ShellClash/master 公测版 -205 (请加TG讨论组:\033[4;36mhttps://t.me/ShellClash\033[0m) http://t.jwsc.eu.org 内测版 +205 (TG讨论组 https://t.me/ShellClash) http://t.jwsc.eu.org 内测版 206 wwng2333自建源 https://mirrors.csgo.ovh/ShellClash 公测版 301 墙洞提供 https://api.dler.io diff --git a/scripts/clash.service b/scripts/clash.service index 267cc7a..32bc66c 100644 --- a/scripts/clash.service +++ b/scripts/clash.service @@ -5,6 +5,7 @@ After=network.target [Service] Type=simple User=root +ExecStartPre=/etc/clash/start.sh bfstart ExecStart=/etc/clash/clash -d /etc/clash >/dev/null ExecStartPost=/etc/clash/start.sh afstart Restart=on-failure diff --git a/scripts/clash.sh b/scripts/clash.sh index 9780d17..ee757f0 100644 --- a/scripts/clash.sh +++ b/scripts/clash.sh @@ -1990,6 +1990,10 @@ case "$1" in -u) read -p "确认卸载ShellClash?(警告:该操作不可逆!)[1/0] > " res if [ "$res" = '1' ]; then + $clashdir/start.sh stop + $clashdir/start.sh cronset "clash服务" + $clashdir/start.sh cronset "订阅链接" + $clashdir/start.sh cronset "ShellClash初始化" read -p "是否保留脚本配置及订阅文件?[1/0] > " res if [ "$res" = '1' ]; then mv -f $clashdir/configs /tmp/clash_$USER @@ -2000,10 +2004,6 @@ case "$1" in else rm -rf $clashdir fi - $clashdir/start.sh stop - $clashdir/start.sh cronset "clash服务" - $clashdir/start.sh cronset "订阅链接" - $clashdir/start.sh cronset "ShellClash初始化" [ -w ~/.bashrc ] && profile=~/.bashrc [ -w /etc/profile ] && profile=/etc/profile sed -i '/alias clash=*/'d $profile diff --git a/scripts/getdate.sh b/scripts/getdate.sh index 54a01bd..857fe7e 100644 --- a/scripts/getdate.sh +++ b/scripts/getdate.sh @@ -7,7 +7,7 @@ error_down(){ setserver } dir_avail(){ - df $2 $1 |awk '{ for(i=1;i<=NF;i++){ if(NR==1){ arr[i]=$i; }else{ arr[i]=arr[i]" "$i; } } } END{ for(i=1;i<=NF;i++){ print arr[i]; } }' |grep Ava |awk '{print $2}' + df $2 $1 |awk '{ for(i=1;i<=NF;i++){ if(NR==1){ arr[i]=$i; }else{ arr[i]=arr[i]" "$i; } } } END{ for(i=1;i<=NF;i++){ print arr[i]; } }' |grep -E 'Ava|可用' |awk '{print $2}' } #导入订阅、配置文件相关 linkconfig(){ diff --git a/scripts/init.sh b/scripts/init.sh index f8f3233..1e924b9 100644 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -1,11 +1,11 @@ #!/bin/sh # Copyright (C) Juewuy -version=1.7.10f +version=1.7.10g setdir(){ dir_avail(){ - df $2 $1 |awk '{ for(i=1;i<=NF;i++){ if(NR==1){ arr[i]=$i; }else{ arr[i]=arr[i]" "$i; } } } END{ for(i=1;i<=NF;i++){ print arr[i]; } }' |grep Ava |awk '{print $2}' + df $2 $1 |awk '{ for(i=1;i<=NF;i++){ if(NR==1){ arr[i]=$i; }else{ arr[i]=arr[i]" "$i; } } } END{ for(i=1;i<=NF;i++){ print arr[i]; } }' |grep -E 'Ava|可用' |awk '{print $2}' } set_usb_dir(){ echo -e "请选择安装目录" diff --git a/scripts/start.sh b/scripts/start.sh index 00c3df9..72cb407 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -141,10 +141,10 @@ mark_time(){ getlanip(){ i=1 while [ "$i" -le "10" ];do - [ -f $TMPDIR/ShellClash_log ] && break host_ipv4=$(ip a 2>&1 | grep -w 'inet' | grep 'global' | grep 'br' | grep -Ev 'iot|metric' | grep -E ' 1(92|0|72)\.' | sed 's/.*inet.//g' | sed 's/br.*$//g' ) #ipv4局域网网段 - host_ipv6=$(ip a 2>&1 | grep -w 'inet6' | grep -E 'global' | sed 's/.*inet6.//g' | sed 's/scope.*$//g' ) #ipv6公网地址段 - [ -n "$host_ipv4" -o -n "$host_ipv6" ] && break + [ "$ipv6_redir" = "已开启" ] && host_ipv6=$(ip a 2>&1 | grep -w 'inet6' | grep -E 'global' | sed 's/.*inet6.//g' | sed 's/scope.*$//g' ) #ipv6公网地址段 + [ -f $TMPDIR/ShellClash_log ] && break + [ -n "$host_ipv4" -a -n "$host_ipv6" ] && break sleep 2 && i=$((i+1)) done #添加自定义ipv4局域网网段 @@ -1041,7 +1041,7 @@ stop_firewall(){ #面板配置保存相关 web_save(){ #使用get_save获取面板节点设置 - get_save http://127.0.0.1:${db_port}/proxies | awk -F "{" '{for(i=1;i<=NF;i++) print $i}' | grep -aE '^"all".*"Selector"' > $TMPDIR/clash_web_check_$USER + get_save http://127.0.0.1:${db_port}/proxies | awk -F ':\\{"' '{for(i=1;i<=NF;i++) print $i}' | grep -aE '^all".*"Selector"' > $TMPDIR/clash_web_check_$USER while read line ;do def=$(echo $line | awk -F "[[,]" '{print $2}') now=$(echo $line | grep -oE '"now".*",' | sed 's/"now"://g' | sed 's/"type":.*//g' | sed 's/,//g')