v1.7.10g
~尝试修复ipv6无法正常代理的bug ~尝试修复标准linux系统开机启动时无法正确生成配置文件的bug ~修复部分中文系统无法正确获取安装目录剩余空间的问题 ~修复卸载时的报错问题 ~修复使用最新meta内核时无法正确保存面板节点选择的问题
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2,5 +2,5 @@ clashnet_v=v1.7.6
|
|||||||
clashpre_v=2022.11.25
|
clashpre_v=2022.11.25
|
||||||
clash_v=v1.7.1
|
clash_v=v1.7.1
|
||||||
meta_v=v1.15.0
|
meta_v=v1.15.0
|
||||||
versionsh=1.7.10f
|
|
||||||
GeoIP_v=20230805
|
GeoIP_v=20230805
|
||||||
|
versionsh=1.7.10g
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ echo "** by Juewuy **"
|
|||||||
echo "***********************************************"
|
echo "***********************************************"
|
||||||
#内置工具
|
#内置工具
|
||||||
dir_avail(){
|
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(){
|
setconfig(){
|
||||||
configpath=$clashdir/mark
|
configpath=$clashdir/mark
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
202 ShellClash私人源1 https://gh.jwsc.eu.org/master 公测版
|
202 ShellClash私人源1 https://gh.jwsc.eu.org/master 公测版
|
||||||
203 ShellClash私人源2 https://gh.shellclash.workers.dev/https://raw.githubusercontent.com/juewuy/ShellClash 公测版
|
203 ShellClash私人源2 https://gh.shellclash.workers.dev/https://raw.githubusercontent.com/juewuy/ShellClash 公测版
|
||||||
204 Github源(须clash服务启用) https://raw.githubusercontent.com/juewuy/ShellClash/master 公测版
|
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 公测版
|
206 wwng2333自建源 https://mirrors.csgo.ovh/ShellClash 公测版
|
||||||
|
|
||||||
301 墙洞提供 https://api.dler.io
|
301 墙洞提供 https://api.dler.io
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ After=network.target
|
|||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
User=root
|
User=root
|
||||||
|
ExecStartPre=/etc/clash/start.sh bfstart
|
||||||
ExecStart=/etc/clash/clash -d /etc/clash >/dev/null
|
ExecStart=/etc/clash/clash -d /etc/clash >/dev/null
|
||||||
ExecStartPost=/etc/clash/start.sh afstart
|
ExecStartPost=/etc/clash/start.sh afstart
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
|||||||
@@ -1990,6 +1990,10 @@ case "$1" in
|
|||||||
-u)
|
-u)
|
||||||
read -p "确认卸载ShellClash?(警告:该操作不可逆!)[1/0] > " res
|
read -p "确认卸载ShellClash?(警告:该操作不可逆!)[1/0] > " res
|
||||||
if [ "$res" = '1' ]; then
|
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
|
read -p "是否保留脚本配置及订阅文件?[1/0] > " res
|
||||||
if [ "$res" = '1' ]; then
|
if [ "$res" = '1' ]; then
|
||||||
mv -f $clashdir/configs /tmp/clash_$USER
|
mv -f $clashdir/configs /tmp/clash_$USER
|
||||||
@@ -2000,10 +2004,6 @@ case "$1" in
|
|||||||
else
|
else
|
||||||
rm -rf $clashdir
|
rm -rf $clashdir
|
||||||
fi
|
fi
|
||||||
$clashdir/start.sh stop
|
|
||||||
$clashdir/start.sh cronset "clash服务"
|
|
||||||
$clashdir/start.sh cronset "订阅链接"
|
|
||||||
$clashdir/start.sh cronset "ShellClash初始化"
|
|
||||||
[ -w ~/.bashrc ] && profile=~/.bashrc
|
[ -w ~/.bashrc ] && profile=~/.bashrc
|
||||||
[ -w /etc/profile ] && profile=/etc/profile
|
[ -w /etc/profile ] && profile=/etc/profile
|
||||||
sed -i '/alias clash=*/'d $profile
|
sed -i '/alias clash=*/'d $profile
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ error_down(){
|
|||||||
setserver
|
setserver
|
||||||
}
|
}
|
||||||
dir_avail(){
|
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(){
|
linkconfig(){
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (C) Juewuy
|
# Copyright (C) Juewuy
|
||||||
|
|
||||||
version=1.7.10f
|
version=1.7.10g
|
||||||
|
|
||||||
setdir(){
|
setdir(){
|
||||||
dir_avail(){
|
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(){
|
set_usb_dir(){
|
||||||
echo -e "请选择安装目录"
|
echo -e "请选择安装目录"
|
||||||
|
|||||||
@@ -141,10 +141,10 @@ mark_time(){
|
|||||||
getlanip(){
|
getlanip(){
|
||||||
i=1
|
i=1
|
||||||
while [ "$i" -le "10" ];do
|
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_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公网地址段
|
[ "$ipv6_redir" = "已开启" ] && 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
|
[ -f $TMPDIR/ShellClash_log ] && break
|
||||||
|
[ -n "$host_ipv4" -a -n "$host_ipv6" ] && break
|
||||||
sleep 2 && i=$((i+1))
|
sleep 2 && i=$((i+1))
|
||||||
done
|
done
|
||||||
#添加自定义ipv4局域网网段
|
#添加自定义ipv4局域网网段
|
||||||
@@ -1041,7 +1041,7 @@ stop_firewall(){
|
|||||||
#面板配置保存相关
|
#面板配置保存相关
|
||||||
web_save(){
|
web_save(){
|
||||||
#使用get_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
|
while read line ;do
|
||||||
def=$(echo $line | awk -F "[[,]" '{print $2}')
|
def=$(echo $line | awk -F "[[,]" '{print $2}')
|
||||||
now=$(echo $line | grep -oE '"now".*",' | sed 's/"now"://g' | sed 's/"type":.*//g' | sed 's/,//g')
|
now=$(echo $line | grep -oE '"now".*",' | sed 's/"now"://g' | sed 's/"type":.*//g' | sed 's/,//g')
|
||||||
|
|||||||
Reference in New Issue
Block a user