~尝试修复ipv6无法正常代理的bug
~尝试修复标准linux系统开机启动时无法正确生成配置文件的bug
~修复部分中文系统无法正确获取安装目录剩余空间的问题
~修复卸载时的报错问题
~修复使用最新meta内核时无法正确保存面板节点选择的问题
This commit is contained in:
juewuy 2023-08-07 22:09:41 +08:00
parent 70f88b13ed
commit e5e2e873c9
11 changed files with 15 additions and 14 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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(){

View File

@ -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 "请选择安装目录"

View File

@ -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')